negative(-11) Documentation

Documentation Home

Custom File Types

The framework is designed to load arbitrary file types based on the class names you reference in code. For instance, if you have a model file named 'user.php' in one of your packages model/ path, the framework would expect to locate a User_Model class in that file. When you make a call to User_Model, the autoload method of the framework will open this file and load the class.

Suppose you want to create a new class type, Library, for your application. In any package, create the folder 'library' and add files named for the base name of the class, just like models. Inside the file, add the appropriate class, and your new file type is ready to be referenced in code. A 'User_Library' class would be stored in library/user.php.


© Copyright 2010 negative11.com