Ok, this is a very general.
 
I am getting annoyed about all the strings I have to remember with the Zend 
Framework. 
 
Things like:
 
getValidator('Authorise')
 
Or form factory methods:
$username = $this->getElement('username')
    ->addValidator('alnum')
    ->setRequired(true)
    ->addFilter('StringTrim')
    ->addValidator('Authorise');

I am using eclipse PDT at the moment which provides good intellisense when code 
is documented well enough,
but it is obviously not man enough to work out the possible strings a function 
could take.  C# family of languages solved this with enums.

When you are setting a parameter that is one of a list of pre defined values it 
pops up a list of what it knows about.

For example when I type addFilter( i should get a list of all the filters i can 
use). I am tempted to add enum classes and start registering things like this.

Another good example are view scripts I have to refer back to the controller 
every time to work out what variables the view has access to. boo hoo hoo

Am I being too fussy? Have I been spoilt by strongly typed languages? 
Ultimately you shouldn't solely rely on an IDE's interpretation but it saves 
SOO much time especially when scooting from project to project then back again.

Does any one else out there share my pain? Have any work arounds / ideas?

-----Original Message-----
From: Bradley Holt [mailto:[EMAIL PROTECTED]
Sent: 28 October 2008 16:30
To: Zend Framework General
Subject: [fw-general] Truncate String


Is there a simple way in ZF to truncate a string? I searched and didn't find 
any talk of a ZF specific component for this. I also looked at the list of 
standard filter classes and didn't see anything there either. I know there are 
tons of possible ways to do this - I'm just surprised there isn't anything in 
ZF yet so perhaps I'm just not looking in the right place.

Thanks,
Bradley

-- 
Bradley Holt
[EMAIL PROTECTED]


This mail has originated outside your organization, either from an external 
partner or the Global Internet.

Keep this in mind if you answer this message.




The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other then the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.


The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other then the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.

Reply via email to