Questions tagged [zend-controller-router]

Standard router component in Zend Framework. Zend Framework is an open source, object-oriented web application framework implemented in PHP 5 and licensed under the New BSD License.

zend-controller-router is a tag suitable for questions regarding standard router component in Zend Framework.

56 questions
1
vote
0 answers

Problem with zend_Controller_Router_Route

I have a trouble with zend_controller_Router_Route. I have created a route: $router = $this->frontController->getRouter(); $route = new Zend_Controller_Router_Route( 'catalog/:categoryIdent/:page', array( 'action' => 'index', …
1
vote
1 answer

Help creating Zend Framework Redirect

I'm trying to create a mod rewrite expression to redirect from localhost/1234 to localhost/controller/action?param=1234. I have the following in my bootstrap.php, which redirects all requests in the form localhost/number $routePublic = new…
1
vote
2 answers

Zend Framework Router dynamic routes

I bumped into a problem and I can't seem to find a good solution to make it work. I have to make some dynamic routes into a Zend Framework project. I'll explain shortly what my problem is: I need to have dynamic custom routes that "extend" the…
Bogdan Constantinescu
  • 5,296
  • 4
  • 39
  • 50
1
vote
3 answers

Zend Framework unknown module is interpreted as default module

i wanted to support multilingual structure for my work i used the following lines $controller=Zend_Controller_Front::getInstance(); $router=$controller->getRouter(); $languageRouter=new…
ahmedsafan86
  • 1,776
  • 1
  • 26
  • 49
1
vote
2 answers

zend routing works only in lowercase letters

I'm setting up routes in application.ini, so when I try to access /moved, it displays cont/move. It works but only if I type moved all lower letters exactly like it's setup on the first line. How can I make Moved or moVed or any other letter…
jblue
  • 4,390
  • 4
  • 46
  • 79
1
vote
1 answer

Zend framework routing params

I have several routes defined in my application. When route A is matched and I assemble an URL using route B without resetting, it does not include the current request parameters. Is there an easy way to include all the request parameters when…
sander
  • 53
  • 5
1
vote
2 answers

implement Zend_Controller_Router_Interface

Here I would like to have a tree of controllers different from that offered by Zend. Let me explain, in many of my projects I find myself with controllers with over 1000 lines of code which is not very top side of code maintainability. So I want to…
anardil
  • 17
  • 5
1
vote
1 answer

Zend Framework isn't looking for camel cased actions when using the router

Hi guys im having a spot of bother, hope someone can shed some light on this. For some strange reason my route comes up saying action does not exist unless i change the camel casing to all lower case for that actions name then it works fine. but…
1
vote
1 answer

ZF: Custom route, make all parts as param

Hopefully someone can help me out here. I have a Zend Router that handles adding stuff to the basket. Now i'm building a customiser module, so the user can add as many parts, in different colors, on specified sections of the product. My basic url is…
Phliplip
  • 3,582
  • 2
  • 25
  • 42
1
vote
1 answer

Zend Router various URLs

I would like to achieve something like this with ZF router. ('controller' => 'products', 'action' => 'index') //Show product details 'http://mydomain.com/en/products/category-1/subcategory-3/product-name.htm' //List products in…
Petr Peller
  • 8,581
  • 10
  • 49
  • 66
1
vote
1 answer

Using Zend_Controller_Router_Route to create friendly URLs for the actions in IndexController

In my IndexController, I currently have indexAction (homepage), loginAction and logoutAction. I'm trying to remove "/index/" from the URL to get domain.com/login instead of domain.com/index/login. What is the cleanest way to achieve this? Is there…
jwhat
  • 2,042
  • 23
  • 29
1
vote
1 answer

ZF1: Routes in database

I'm building a simple CMS module for my ZendFramework application. Currently I have all my routes in a .ini file, would it be possible to make it db-driven. Or if it's possible to build a fallback method to a DB-check if the route doesn't exists in…
1
vote
2 answers

Tips on writing/designing a URL Router in PHP using OOP

I love the elegance of Zend_Controller_Router_Rewrite and the various route classes it uses. I'd like to write a very similar routing system as a standalone component so I can translate URLs into a set of parameters and assemble them back again. The…
JW.
  • 4,821
  • 5
  • 43
  • 60
1
vote
1 answer

Language as subdomain with Zend 1.9

I am playing with Zend 1.9 and would like to have the language parameter as subdomain. Like : http://en.site.com Is it possible to get the language in .htaccess and set it to an environment variable which I can use in Zend ? What is the best way to…
thierryb
  • 3,660
  • 4
  • 42
  • 58
1
vote
1 answer

Zend_Controller_Router_Route_Hostname for two domain names

protected function _initHostnameRouter() { $this->bootstrap('autoload'); $this->bootstrap('FrontController'); $front = $this->getResource('FrontController'); $router = $front->getRouter(); $hostRoute1 = new…
NewPHP
  • 608
  • 2
  • 15
  • 28