source code bean

Archive for the ‘Zend Framework’ Category

In this post I am going to show how easy it is to create a JSON-RPC web service using the built in support in Zend Framework. First we need to create the php-file that will handle the incoming RPC calls. It is not advised to put this inside the MVC structure of a Zend web [...]

Today I upgraded a project we started working on last year from Zend Framework 1.7 to Zend Framework 1.9. I excepted to run into several API incompatibilities, but the only problem I got was the autoloader. In Zend 1.7, and earlier versions, the autoloader was registered like this:   require_once "Zend/Loader.php"; Zend_Loader::registerAutoload();   In Zend [...]

It used to be a bit tricky to get started with the Zend Framework. The Zend Framework is very flexible and allows you to set it up in almost any way that fits your needs. This means for example that the directory structure and location of files is up to you, however – there is [...]

23 Feb, 2009

Friendly URLs and the Zend Router

Posted by: Peter In: PHP|Zend Framework

Creating custom friendly URLs using the Zend framework is really simple. The default routing setup for Zend is : ‘:module/:controller/:action/*’, (* will match any var/value) which is fine for most setups. However on some pages having the var/value might not look very good, for example this url is not very readable: /popular/index/type/images/page/1/sortOrder/alltime (controller/action/var/value/var/value/var/value) We would [...]

Zend Framework ships with several View Helpers, such as the url View Helper. Anywhere in a view script one can call $this->url() to generate a url to a certain page. For example: $this->url(array(   ‘module’ => ‘moduleName’,   ‘action’ => ‘actionName’,   ‘additionalParam’ =>‘value’)) I wanted to create my own helper, for generating paths to [...]


Adwords

About

Welcome to source code bean! On this site I post stuff that I encounter in my job and spare time. The content is mostly related to .NET development, but my interest in techonology is very broad, so often you will find posts on totally different subjects!