Public Member Functions | |
| & | db ($config) |
| & | page ($name) |
| & | model ($name) |
| & | fly_model ($table) |
| & | plugin ($name, $type='page') |
| & | helper ($name) |
| & | newobj ($type, $name, $filespec) |
| build_class_map ($files) | |
Definition at line 25 of file factory.php.
| Factory::build_class_map | ( | $ | files | ) |
| & Factory::db | ( | $ | config | ) |
Return a new database connection object
| array | $config Connection parameters (host,user,pass,name) |
Definition at line 34 of file factory.php.
References DS.
| & Factory::fly_model | ( | $ | table | ) |
Return an ad-hoc ("on the fly") model object. A fly-model is just an instance of RecordModel that's been configured to use the specified table.
This is convenient for simple tables, when explicitly defining a model class may be overkill.
| string | $table The database table that this fly-model will operate on. |
Definition at line 137 of file factory.php.
References DS.
| & Factory::helper | ( | $ | name | ) |
Return a new helper (aka "template plugin") object If an existing helper object already exists, it will be used.
| string | $name |
Definition at line 202 of file factory.php.
References plugin().
| & Factory::model | ( | $ | name | ) |
Return a new data model object If an existing model object already exists, it will be used.
| string | $name |
Definition at line 100 of file factory.php.
References DS, Registry::get(), newobj(), and Registry::set().
Referenced by RecordModel_Base::depend(), Model_Base::depend(), and Page_Base::import_model().
| & Factory::newobj | ( | $ | type, | |
| $ | name, | |||
| $ | filespec | |||
| ) |
Definition at line 211 of file factory.php.
References $files, build_class_map(), Registry::get(), and Registry::set().
| & Factory::page | ( | $ | name | ) |
Return a new page controller object. If an existing controller object already exists, it will be used.
| string | $name |
Definition at line 70 of file factory.php.
References DS, Registry::get(), newobj(), and Registry::set().
Referenced by Page_Base::render_element(), and Web::run().
| & Factory::plugin | ( | $ | name, | |
| $ | type = 'page' | |||
| ) |
Return a new plugin object. If an existing plugin object already exists, it will be used.
| string | $name | |
| string | $type Type of plugin (page, template) |
Definition at line 159 of file factory.php.
References DS, Registry::get(), newobj(), and Registry::set().
Referenced by Plugin_Base::depend(), helper(), Template::import_helper(), RecordModel_Base::import_plugin(), Page_Base::import_plugin(), and Model_Base::import_plugin().
1.6.1