Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-10-2008, 01:53 PM
Junior Member
 
Join Date: Sep 2007
Posts: 3
Question Unable to use/inject custom routers

Hi!
I am adding routers to my index.php [bootstrap file] as follows:

PHP Code:
Zend_Loader::loadClass('Zend_Controller_Router_Rewrite');


$router = new Zend_Controller_Router_Rewrite();


$router->addRoute(
    
'Person',
    new 
Zend_Controller_Router_Route('Person', array('controller' => 'Person''action' => 'index'))
);


$router->setRouter($router);


/* SECOND METHOD OF ADDING ROUTER */


$route = new Zend_Controller_Router_Route(
    
'Person',
    array(
        
'controller' => 'Person',
        
'action'     => 'indexAction'
    
)
);

$router->addRoute('user'$route); 

My Router Controller file name is 'PersonController'. Its code is as follows:

PHP Code:
class PersonController extends Zend_Controller_Action{    
    
    var 
$layout;
    
    
    public function 
indexAction()
    {    
        
$this->_helper->viewRenderer->setNoRender(false);
            
        echo 
'This Is PersonController Class';    
        
    } 
When I want to access http://localhost/personal/dev/Person

Then it gives me error. On the other hand following url works fine.
http://localhost/personal/dev/

Note: I have studied manual/api of ZF visited some links on web, so that I am able to add routers as mentioned above


Can some one guides me that where I am going wrong.



Thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-21-2008, 06:21 PM
Junior Member
 
Join Date: Jun 2008
Posts: 5
Thumbs down Coffee break

Four surgeons were taking a coffee break and discussing their work.The first one said, "I think accountants are the easiest to operate on. Everything inside them is numbered.""I think librarians are the easiest," said the second. "When you open them up, all their organs are arranged alphabetically."The third surgeon said, "I prefer to operate on electricians. Their organs are color-coded."..World Of Warcraft gold is WoW gold."You're all wrong," said, the fourth. "Lawyers are easiest. They're heartless, spineless,gutless, and their heads and asses are interchangeable."
__________________
World Of Warcraft gold
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:55 PM.