cakephp-1.3 > App :: import()
App
A
AclBase
AclBehavior
AclComponent
AclNode
AclShell
Aco
AcoAction
AjaxHelper
ApcEngine
ApiShell
App
AppController
AppController
AppHelper
AppHelper
AppModel
AppModel
Aro
AuthComponent
B
BakeShell
BakeTask
BehaviorCollection
C
Cache
CacheEngine
CacheHelper
CakeErrorController
CakeLog
CakeRoute
CakeSchema
CakeSession
CakeSocket
ClassRegistry
Component
Configure
ConnectionManager
ConsoleShell
ContainableBehavior
Controller
ControllerTask
CookieComponent
D
DataSource
DbAcl
DbAclSchema
DbConfigTask
DboMssql
DboMysql
DboMysqlBase
DboMysqli
DboOracle
DboPostgres
DboSource
DboSqlite
Debugger
Dispatcher
E
EmailComponent
ErrorHandler
ErrorHandler
ExtractTask
F
File
FileEngine
FileLog
FixtureTask
Folder
FormHelper
H
Helper
HtmlHelper
HttpSocket
I
I18n
I18nModel
i18nSchema
I18nShell
Inflector
IniAcl
J
JavascriptHelper
JqueryEngineHelper
JsBaseEngineHelper
JsHelper
L
L10n
M
MagicDb
MagicFileResource
MediaView
MemcacheEngine
Model
ModelBehavior
ModelTask
MootoolsEngineHelper
Multibyte
N
NumberHelper
O
Object
Overloadable
Overloadable
Overloadable2
Overloadable2
P
PagesController
PagesController
PaginatorHelper
Permission
PluginShortRoute
PluginTask
ProjectTask
PrototypeEngineHelper
R
RequestHandlerComponent
Router
RssHelper
S
Sanitize
Scaffold
ScaffoldView
SchemaShell
Security
SecurityComponent
SessionComponent
SessionHelper
SessionsSchema
Set
Shell
ShellDispatcher
String
T
TemplateTask
TestSuiteShell
TestTask
TextHelper
ThemeView
TimeHelper
TranslateBehavior
TreeBehavior
V
Validation
View
ViewTask
X
XcacheEngine
Xml
XmlElement
XmlHelper
XmlManager
XmlNode
XmlTextNode
import
line:866 at
/cake/libs/configure.php
Finds classes based on $name or specific file(s) to search. Calling App::import() will
not construct any classes contained in the files. It will only find and require() the file.
Method
(boolean)
import
($type = null, $name = null, $parent = true, $search = array(), $file = null, $return = false)
Parameters
Parameter | Type | Comment | Default |
---|---|---|---|
$type | mixed | optional The type of Class if passed as a string, or all params can be passed as an single array to $type, | null |
$name | string | optional Name of the Class or a unique name for the file | null |
$parent | mixed | optional 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"; | true |
$search | array | optional paths to search for files, array('path 1', 'path 2', 'path 3'); | array() |
$file | string | optional full name of the file to search for including extension | null |
$return | ? | optional | false |
Return
booleanComment
Finds classes based on $name or specific file(s) to search. Calling App::import() will
not construct any classes contained in the files. It will only find and require() the file.
@link http://book.cakephp.org/view/934/Using-App-import
@param mixed $type The type of Class if passed as a string, or all params can be passed as
an single array to $type,
@param string $name Name of the Class or a unique name for the file
@param 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";
@param array $search paths to search for files, array('path 1', 'path 2', 'path 3');
@param string $file full name of the file to search for including extension
@param boolean $return, return the loaded file, the file must have a return
statement in it to work: return $variable;
@return boolean true if Class is already in memory or if file is found and loaded, false if not
@access public
not construct any classes contained in the files. It will only find and require() the file.
@link http://book.cakephp.org/view/934/Using-App-import
@param mixed $type The type of Class if passed as a string, or all params can be passed as
an single array to $type,
@param string $name Name of the Class or a unique name for the file
@param 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";
@param array $search paths to search for files, array('path 1', 'path 2', 'path 3');
@param string $file full name of the file to search for including extension
@param boolean $return, return the loaded file, the file must have a return
statement in it to work: return $variable;
@return boolean true if Class is already in memory or if file is found and loaded, false if not
@access public