What do you mean by this "To avoid DRY the code inside the method could be
replaced with an action helper. "
Do you mean implement my frontcontroller logic as an action helper and call
the action helper in preDispatch function on the controllers I need it?
--
View this message in context:
http:
I currently have a FrontController plugin that extends
Zend-Controller_Plugin_Abstract. The preDispatch function is implemented in
it. Everything works except for one thing. How can I prevent the preDispatch
function to be applied to certain controllers? The only way I have right
noew is to use $t
Got it. Thanks for your help
--
View this message in context:
http://n4.nabble.com/Zend-routing-can-this-logic-be-done-tp1580002p1580096.html
Sent from the Zend Framework mailing list archive at Nabble.com.
Ok I get what your saying. Your saying since the regexp route will NOT match
when I do something like this http://hostname/controller/action the default
route will work. When I try this http://hostname/pagename.html the regexp
route (pages) will apply and then the PagesController will take over.
Its doest but it breaks http://hostname/controller/action. I want to have
both behaviors based on if there is an html page specified or not
--
View this message in context:
http://n4.nabble.com/Zend-routing-can-this-logic-be-done-tp1580002p1580076.html
Sent from the Zend Framework mailing list
To be more precise on my above post. When calling
http://hostname/pagename.html the pagename is used as a param in the
PagesController. I then query the db for some info and then generate the
actual page and then dump it to the browser.
--
View this message in context:
http://n4.nabble.com/Zend
I have the two route scenario working already. One default route and one
pages route.
I need the single route because I want to able serve generated webpages off
Zend that will have this url: http://hostname/pagename.html ( I dont want it
to be http://hostname/pages/pagename.html)
I also want t
ok but the code you provided creates a pages route. I want it to be applied
to the default route.
I changed your code to this:
resources.router.routes.default.type = "Zend_Controller_Router_Route_Regex"
resources.router.routes.default.route = "([a-zA-Z0-9-]+).html"
resources.router.routes.default
Trying to figure out if I can implement something like this with Zend
routing.
Here is what I would like to do
- Keep the default route logic the same
- When an html page is requested forward it to PagesController index action
Ex: http://hostname/controller/action -> this uses default route
If you want to use string you have to do something like this
Importation Liste
List Import
and then you can do
$translate->_('List Import'); // $translate is an instance of Zend_Translate
--
View this message in context:
http://n4.nabble.com/Zend-T
Found the issue. magic_quotes_gpc is enabled and escaping all " with \". This
causes the issue. Have to disable it or use stripslashes function on $json
before decoding.
asagala wrote:
>
> I am having a weird issue with Zend_JSON:decode function. everything works
> on m
I am having a weird issue with Zend_JSON:decode function. everything works on
my local. I run into the issue when running the same code on a production
box. When I call $json =
Zend_Json::decode($this->_request->getPost('results')); the returned $json
is empty.
I checked that php json extensions
Still havent figured this out anyone have a clue?
asagala wrote:
>
>
> By the way you can set the locale string in the constructor. This works in
> the bootstrap file
>
> $locale = new Zend_Locale('en_US');
> Zend_Registry::set(
ts headers into the response, which are then read if you dont
> get to the end, you wont get those output if they're buffering. Flushing
> would resolve this...
>
> K
>
> asagala wrote:
>> Question. Why do I have to call this function
>> Zend_Wildfire_Chan
Question. Why do I have to call this function
Zend_Wildfire_Channel_HttpHeaders::getInstance()->flush();
to see output in my firebug console. If I do something like this:
Zend_Registry::get('firebug')->log('blah!',Zend_Log::DEBUG);
it doesnt output anything but if I do this:
Zend_Registry::get(
By the way you can set the locale string in the constructor. This works in
the bootstrap file
$locale = new Zend_Locale('en_US');
Zend_Registry::set('Zend_Locale', $locale);
I get the issue when I try to overwrite the value in my control
a string does not overwrite the content of the set
> instance.
>
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
>
>
> - Original Message -
> From: "asagala"
> To:
> Sent: Friday, November 06, 2
Maybe this is totally off topic but I know when I want to return JSON data
from one of my controller actions I use the json helper. You use it like
this $this->_helper->json($data); where $data is an array of data that you
want to send by JSON. NIce thing is that is also disables the view. No need
oader basicaly doesnt allow the rest of the boostrap to
be executed! Moved the
Zend_Controller_Action_HelperBroker::addPrefix('Helper'); in its own init
method and everything works!
asagala wrote:
>
> Hi,
>
> Cant seem to get my Action Helpers to be discovered by Zend.
Can you send me a copy of your bootstrap.php file and application.ini so I
see what a working one looks like
weierophinney wrote:
>
> -- asagala wrote
> (on Sunday, 25 October 2009, 11:02 AM -0700):
>>
>> Tried that. It doesnt work.
>
> Is App/library on your
ader_Autoloader::getInstance()->setFallbackAutoloader(true);
> }
> if (isset($options['includeFileCache']) AND file_exists($file =
> $options['includeFileCache'])) {
> Zend_Loader_PluginLoader::setIncludeFileCache($file);
> }
> return $autoloader;
> }
&g
return void
> */
> public function init()
> {
> $options = $this->getOptions();
> $autoloader = new Zend_Application_Module_Autoloader(array(
> 'namespace' => $options['namespace'],
> 'basePath' => $options['basePath']
> ));
&
ead
[staging : production]
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
weierophinney wrote:
>
> -- asagala wrote
> (on Sunday, 25 October 20
plication_Bootstrap_Exception' with
message 'No default controller directory registered with front controller'
in C:\Program
Files\Zend\ZendServer\share\ZendFramework\library\Zend\Application\Bootstrap\Bootstrap.php
Also I am using applications and not App. Should of typed the whole th
Everything works but still dont understand why I cant get it working with
regular paths.
asagala wrote:
>
> Tried that. It doesnt work.
>
>
>
> weierophinney wrote:
>>
>> -- asagala wrote
>> (on Sunday, 25 October 2009, 09:45 AM -0700):
>>>
>&
Tried that. It doesnt work.
weierophinney wrote:
>
> -- asagala wrote
> (on Sunday, 25 October 2009, 09:45 AM -0700):
>>
>> Added autoloaderNamespaces[] = "Helper_" to my application.ini file but
>> still
>> no success. I st
Added autoloaderNamespaces[] = "Helper_" to my application.ini file but still
no success. I still get that the Action Helper is not found
weierophinney wrote:
>
> -- asagala wrote
> (on Sunday, 25 October 2009, 06:32 AM -0700):
>> Cant seem to get my Action Helpers
Hi,
Cant seem to get my Action Helpers to be discovered by Zend. I have read a
couple of articles but still cant seem to get them to work.
i have this line in the Bootstrap.php
Zend_Controller_Action_HelperBroker::addPrefix('Helper');
My file structure is like this
App\
--library\
Helper
28 matches
Mail list logo