“Whyte Model” is a set of two abstract classes used as a base for model layer implementation in Zend Framework. It was made with two things in mind:
These are the steps for a unix-system. As they are trivial, one should be fine following them on Windows.
Navigate to your ZF-project’s library folder. It should be on include_path basically:
cd myzfproject/library
Note
Whyte Model assumes you have Zend Autoloader employed.
Now let git make the folder and download the package into it:
git clone git://github.com/yentsun/Whyte.git
If your project follows the recommended structure, in your application/configs/application.ini add autoloadernamespaces for class autoloading:
autoloadernamespaces.whyte = "Whyte_"
Or you can simply add a require statement where appropriate.
Done! You now can inherit Whyte_Model_Entity and Whyte_Model_Mapper classes in your models/mappers:
<?php
class Application_Model_Something extends Whyte_Model_Entity {
...
}
Read on: