Factory Class Reference

List of all members.

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)

Detailed Description

Definition at line 25 of file factory.php.


Member Function Documentation

Factory::build_class_map ( files  ) 

Definition at line 247 of file factory.php.

References $files.

Referenced by newobj().

& Factory::db ( config  ) 

Return a new database connection object

Parameters:
array $config Connection parameters (host,user,pass,name)
Returns:
object

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.

Parameters:
string $table The database table that this fly-model will operate on.
Returns:
object

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.

Parameters:
string $name
Returns:
object

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.

Parameters:
string $name
Returns:
object

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().

Referenced by model(), page(), and plugin().

& Factory::page ( name  ) 

Return a new page controller object. If an existing controller object already exists, it will be used.

Parameters:
string $name
Returns:
object

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.

Parameters:
string $name
string $type Type of plugin (page, template)
Returns:
object

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().


The documentation for this class was generated from the following file:

Generated on Wed Jan 13 09:21:04 2010 for Pronto Framework by  doxygen 1.6.1