Quantcast

View Scripts

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

View Scripts

Thomas List

Hello,

I am creating a controller, Mainewap, in Zend and it is creating the view script directory and index as it should. However, in another controller, I am getting the state, Maine, and trying to append 'wap' to the end of the name, to handle information specific to low income programs.   However, when I append "wap" to the end of the state name, Zend decides to split it up randomly with a dash, so it may come out as main-ewap, and won't find the directory.  Is there any way to ensure that when I create the state's second view script of information, it doesn't put a random dash in the name?

I'm not sure if I explained the problem well enough, but i basically want to create the name of an existing controller in another file, and redirect to the properly named view script directory associated with the controller.  No random dashes.  Is this possible?

Regards,
Thomas    
     
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: View Scripts

weierophinney
Administrator
-- Thomas List <[hidden email]> wrote
(on Tuesday, 21 December 2010, 04:58 PM -0500):
> I am creating a controller, Mainewap, in Zend and it is creating the
> view script directory and index as it should. However, in another
> controller, I am getting the state, Maine, and trying to append 'wap'
> to the end of the name, to handle information specific to low income
> programs.   However, when I append "wap" to the end of the state name,
> Zend decides to split it up randomly with a dash, so it may come out
> as main-ewap, and won't find the directory.  Is there any way to
> ensure that when I create the state's second view script of
> information, it doesn't put a random dash in the name?

How exactly are you appending? And what exactly are you appending?

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: View Scripts

Wil Moore III
weierophinney wrote
> I am creating a controller, Mainewap...
I notice you named the controller "Mainewap" which leads me to believe that you know the difference between naming the controller:

"Mainewap" vs
"MaineWap".

The difference is that the second variation is "inflected" to/from "maine-wap" where the first stays as "Mainewap".

weierophinney wrote
...when I append "wap" to the end of the state name, Zend decides to split it up randomly with a dash, so it may come out as main-ewap, and won't find the directory.
This leads me to believe that the string you are ending up with looks something like "MainEwap". If you want to reference a directory of "maine-wap" you likely need to ensure that you have "MaineWap" or you should just build the directory name without handing it to the inflector.

Of course, I'm taking a shot in the dark as you didn't exactly spell-out your entire workflow so it really is difficult to know for sure what the correct solution should be.

If you have more information to add, that would be great.

Is there any way to
> ensure that when I create the state's second view script of
> information, it doesn't put a random dash in the name?

How exactly are you appending? And what exactly are you appending?

--
Matthew Weier O'Phinney
Project Lead            | matthew@zend.com
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc


--
Wil Moore III

Best Practices for Working with Open-Source Developers
http://www.faqs.org/docs/artu/ch19s02.html

Why is Bottom-posting better than Top-posting:
http://www.caliburn.nl/topposting.html

DO NOT TOP-POST and DO trim your replies:
http://linux.sgms-centre.com/misc/netiquette.php#toppost
Loading...