[TYPO3-ect] General feedback for lib/div

Jochen Rieger j.rieger at connecta.ag
Wed Jun 13 13:51:23 CEST 2007


Hi Elmar,

> How are the files included. By an manual require_once? Or do they have an
> autoload mechanism. If yes, how does it works?

let's have a look at the controller's parent class constructor. [1]

They are working a lot with class vars and regex stuff. First of all 
each and every class (also those of your application that extend the 
main classes) has eg:

var $name = 'Orders';

The __constructor takes this var and does any operation with it. First 
it checks, if the value of $name is present in the classname. Then they 
have these methods singularize(), pluralize(), underscore(), camelize() 
etc to be found in the inflector class [2]. You also see there 
implemented plural rules (man / men etc).

A lot of other nice stuff (often controlled just by setting class vars) 
can be found in cake but posting that would be offtopic for now.

The file basics.php [3] contains the loader functions as far as I could 
figure out: loadControllers(), loadModels() etc.

Hope that might be of any help.

Regards,
Jochen

[1] http://api.cakephp.org/controller_8php-source.html
[2] http://api.cakephp.org/inflector_8php-source.html
[3] http://api.cakephp.org/basics_8php-source.html

-- 
Connecta AG TYPO3 Development
http://www.connecta.ag


More information about the TYPO3-team-extension-coordination mailing list