App Class Reference

Inheritance diagram for App:

Object List of all members.

Public Member Functions

 __destruct ()
 __find ($file, $recursive=true)
 __load ($file)
 __map ($file, $name, $type, $plugin)
 __mapped ($name, $type, $plugin)
 __overload ($type, $name)
 __paths ($type)
 __remove ($name, $type, $plugin)
 __settings ($type, $plugin, $parent)
getInstance ()
 import ($type=null, $name=null, $parent=true, $search=array(), $file=null, $return=false)

Public Attributes

 $__cache = false
 $__loaded = array()
 $__map = array()
 $__paths = array()
 $return = false
 $search = array()

Detailed Description

Definition at line 720 of file configure.php.


Constructor & Destructor Documentation

App::__destruct (  ) 

Object destructor.

Writes cache file if changes have been made to the $__map or $__paths

Returns:
void private

Definition at line 1185 of file configure.php.

References __map(), __paths(), Configure::corePaths(), and Cache::write().


Member Function Documentation

App::__find ( file,
recursive = true 
)

Locates the $file in $__paths, searches recursively.

Parameters:
string $file full file name
boolean $recursive search $__paths recursively
Returns:
mixed boolean on fail, $file directory path on success private

Definition at line 919 of file configure.php.

References $path, __load(), __paths(), Folder(), and Cache::read().

App::__load ( file  ) 

Attempts to load $file.

Parameters:
string $file full path to file including file name
Returns:
boolean private

Definition at line 966 of file configure.php.

Referenced by __find(), and import().

App::__map ( file,
name,
type,
plugin 
)

Maps the $name to the $file.

Parameters:
string $file full path to file
string $name unique name for this map
string $type type object being mapped
string $plugin if object is from a plugin, the name of the plugin private

Definition at line 991 of file configure.php.

References camelize().

Referenced by __destruct(), __mapped(), and __remove().

App::__mapped ( name,
type,
plugin 
)

Returns a file's complete path.

Parameters:
string $name unique name
string $type type object
string $plugin if object is from a plugin, the name of the plugin
Returns:
mixed, file path if found, false otherwise private

Definition at line 1008 of file configure.php.

References __map(), and camelize().

Referenced by import().

App::__overload ( type,
name 
)

Used to overload objects as needed.

Parameters:
string $type Model or Helper
string $name Class name to overload private

Definition at line 1030 of file configure.php.

References Overloadable::overload().

App::__paths ( type  ) 

Returns default search paths.

Parameters:
string $type type of object to be searched
Returns:
array list of paths private

Definition at line 1127 of file configure.php.

References $path, Configure::corePaths(), and Configure::read().

Referenced by __destruct(), and __find().

App::__remove ( name,
type,
plugin 
)

Removes file location from map if the file has been deleted.

Parameters:
string $name name of object
string $type type of object
string $plugin name of plugin
Returns:
void private

Definition at line 1169 of file configure.php.

References __map(), and camelize().

App::__settings ( type,
plugin,
parent 
)

Loads parent classes based on $type. Returns a prefix or suffix needed for loading files.

Parameters:
string $type type of object
string $plugin name of plugin
boolean $parent false will not attempt to load parent
Returns:
array private

Definition at line 1045 of file configure.php.

References $path, camelize(), Configure::corePaths(), import(), Configure::read(), and underscore().

& App::getInstance (  ) 

Returns a single instance of App.

Returns:
object public

Definition at line 903 of file configure.php.

References Cache::read().

Referenced by import().

App::import ( type = null,
name = null,
parent = true,
search = array(),
file = null,
return = false 
)

Finds classes based on $name or specific file(s) to search.

mixed $type The type of Class if passed as a string, or all params can be passed as an single array to $type, string $name Name of the Class or a unique name for the file mixed $parent boolean true if Class Parent should be searched, accepts key => value array('parent' => $parent ,'file' => $file, 'search' => $search, 'ext' => '$ext'); $ext allows setting the extension of the file name based on Inflector::underscore($name) . ".$ext"; array $search paths to search for files, array('path 1', 'path 2', 'path 3'); string $file full name of the file to search for including extension boolean $return, return the loaded file, the file must have a return statement in it to work: return $variable; boolean true if Class is already in memory or if file is found and loaded, false if not public

Definition at line 781 of file configure.php.

References $return, $search, __load(), __mapped(), camelize(), getInstance(), and underscore().

Referenced by __(), __c(), __construct(), AclComponent::__construct(), ErrorHandler::__construct(), __d(), __dc(), __dcn(), __dn(), TestSuiteShell::__installSimpleTest(), ModelTask::__interactive(), Dispatcher::__loadController(), ViewTask::__loadController(), __n(), Object::__openPersistent(), EmailComponent::__renderTemplate(), __settings(), EmailComponent::__smtp(), CacheHelper::__writeFile(), Shell::_checkUnitTest(), TranslateBehavior::_getLocale(), Dispatcher::_invoke(), Component::_loadComponents(), View::_loadHelpers(), Shell::_loadModels(), BakeShell::all(), BehaviorCollection::attach(), ControllerTask::bakeActions(), Dispatcher::cached(), Object::cakeError(), Set::classicExtract(), ModelTask::doAssociations(), JavascriptHelper::escapeString(), ModelTask::fixture(), Security::generateAuthKey(), ClassRegistry::init(), AuthComponent::initialize(), ConsoleShell::initialize(), Xml::load(), make_clean_css(), CakeSchema::read(), and Controller::render().


Member Data Documentation

App::$__cache = false

Definition at line 741 of file configure.php.

App::$__loaded = array()

Definition at line 762 of file configure.php.

App::$__map = array()

Definition at line 748 of file configure.php.

App::$__paths = array()

Definition at line 755 of file configure.php.

App::$return = false

Definition at line 734 of file configure.php.

Referenced by import().

App::$search = array()

Definition at line 727 of file configure.php.

Referenced by import().


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 00:30:55 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7