zend framework - Zend_Controller_Router_Route_Hostname with additional variable -
i'm having problem chaining routes using variable @ end. i'm using wild card sub domains. this: http://eric.mysite.dev/mypage1 mypage1 going variable. want http://mysite.dev/donate/now/index/id/eric/pagename/mypage1
i have working fine without pagename this:
$router=$fc->getrouter(); // host routes $accounthostroute = new zend_controller_router_route_hostname(':urlname.mysite.dev', array('module' => 'donate', 'controller' => 'now', 'action' => 'index'), array('urlname'=>'(?!www$).*') ); // account routes $router->addroute('donatewithhostnamelocal', $accounthostroute->chain( new zend_controller_router_route_hostname( ':urlname.mysite.dev', array( 'module' => 'donate', 'controller' => 'now', 'action' => 'index' ) ) ));
but want page name, tried it's not working:
// account dynamic pages routes $router->addroute('donatewithhostnamepagenamelocal', $accounthostroute->chain( new zend_controller_router_route_hostname( ':urlname.mysite.dev/:pagename', array( 'module' => 'donate', 'controller' => 'now', 'action' => 'index' ) ) ));
i application error of: message: resource 'default:mypage1' not found
stack trace: 0 /applications/mamp/bin/php5/lib/php/zendframework-1.9.6/library/zend/acl.php(751): zend_acl->get('default:mypage1') 1 /applications/mamp/htdocs/mysite/application/modules/default/plugins/accesscheck.php(15): zend_acl->isallowed('guest', 'default:mypage1', 'index') 2 /applications/mamp/bin/php5/lib/php/zendframework-1.9.6/library/zend/controller/plugin/broker.php(309): plugin_accesscheck->predispatch(object(zend_controller_request_http)) 3 /applications/mamp/bin/php5/lib/php/zendframework-1.9.6/library/zend/controller/front.php(933): zend_controller_plugin_broker->predispatch(object(zend_controller_request_http)) 4 /applications/mamp/bin/php5/lib/php/zendframework-1.9.6/library/zend/application/bootstrap/bootstrap.php(77): zend_controller_front->dispatch() 5 /applications/mamp/bin/php5/lib/php/zendframework-1.9.6/library/zend/application.php(358): zend_application_bootstrap_bootstrap->run() 6 /applications/mamp/htdocs/mysite/public/index.php(34): zend_application->run() 7 {main}
request parameters: array ( 'controller' => 'mypage1', 'action' => 'index', 'module' => 'default', )
i'd suspect acl doesn't have resource defined , use custom logic generate resources.
Comments
Post a Comment