Read the latest web development and design tips at Fred Wu's new blog! :-)
Poke me on GitHub

Posts Tagged ‘name convention’

Class naming convention in Zend Framework makes life harder

First of all, not all parts of the Zend Framework enforce the class naming convention, at least not upon calling ‘em. For example, view helpers are called directly by the ‘chopped’ class name:

// actual class name:
class Path_To_The_CustomViewHelper {}

// calling it in the view:
$this->CustomViewhelper();

Also, models are both named, and called by their class names without any paths (but yes we have to include them in the include paths).

You would think that in most cases calling the classes by their full names (with paths) should work, right?

Wrong.

(more…)

Related posts