cakephp-2.0 > App :: import()
App
A
AbstractTransport
AclBehavior
AclComponent
AclInterface
AclNode
AclShell
Aco
AcoAction
ActionsAuthorize
ApcEngine
ApiShell
App
AppController
AppController
AppHelper
AppHelper
AppModel
AppModel
AppShell
Aro
AuthComponent
B
BadRequestException
BakeShell
BakeTask
BaseAuthenticate
BaseAuthorize
BasicAuthenticate
BasicAuthentication
BehaviorCollection
C
Cache
CacheEngine
CacheException
CacheHelper
CacheSession
CakeEmail
CakeErrorController
CakeException
CakeLog
CakeLogException
CakeLogInterface
CakePlugin
CakeRequest
CakeResponse
CakeRoute
CakeSchema
CakeSession
CakeSessionException
CakeSessionHandlerInterface
CakeSocket
ClassRegistry
CommandListShell
Component
ComponentCollection
ConfigReaderInterface
Configure
ConfigureException
ConnectionManager
ConsoleErrorHandler
ConsoleException
ConsoleInput
ConsoleInputArgument
ConsoleInputOption
ConsoleInputSubcommand
ConsoleOptionParser
ConsoleOutput
ConsoleShell
ContainableBehavior
Controller
ControllerAuthorize
ControllerTask
CookieComponent
CrudAuthorize
D
DatabaseSession
DataSource
DbAcl
DbAclSchema
DbConfigTask
DboSource
Debugger
DebugTransport
DigestAuthenticate
DigestAuthentication
Dispatcher
E
EmailComponent
ErrorHandler
ExceptionRenderer
ExtractTask
F
File
FileEngine
FileLog
FixtureTask
Folder
ForbiddenException
FormAuthenticate
FormHelper
H
Helper
HelperCollection
HelpFormatter
HtmlHelper
HttpException
HttpResponse
HttpSocket
I
I18n
I18nModel
i18nSchema
I18nShell
Inflector
IniReader
InternalErrorException
J
JqueryEngineHelper
JsBaseEngineHelper
JsHelper
L
L10n
M
MailTransport
MediaView
MemcacheEngine
MethodNotAllowedException
MissingActionException
MissingBehaviorException
MissingComponentException
MissingConnectionException
MissingControllerException
MissingDatabaseException
MissingDatasourceConfigException
MissingDatasourceException
MissingHelperException
MissingLayoutException
MissingModelException
MissingPluginException
MissingShellException
MissingShellMethodException
MissingTableException
MissingTaskException
MissingTestLoaderException
MissingViewException
Model
ModelBehavior
ModelTask
MootoolsEngineHelper
Multibyte
Mysql
N
NotFoundException
NumberHelper
O
Object
ObjectCollection
P
PagesController
PagesController
PaginatorComponent
PaginatorHelper
Permission
PhpReader
PluginShortRoute
PluginTask
Postgres
PrivateActionException
ProjectTask
PrototypeEngineHelper
R
RedirectRoute
RequestHandlerComponent
Router
RouterException
RssHelper
S
Sanitize
Scaffold
ScaffoldView
SchemaShell
Security
SecurityComponent
SessionComponent
SessionHelper
SessionsSchema
Set
Shell
ShellDispatcher
SmtpTransport
SocketException
Sqlite
Sqlserver
String
T
TaskCollection
TemplateTask
TestsuiteShell
TestTask
TextHelper
ThemeView
TimeHelper
TranslateBehavior
TreeBehavior
U
UnauthorizedException
UpgradeShell
V
Validation
View
ViewTask
W
WincacheEngine
X
XcacheEngine
Xml
XmlException
import
line:580 at
/lib/Cake/Core/App.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)
public 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/2.0/en/core-utility-libraries/app.html#including-files-with-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
not construct any classes contained in the files. It will only find and require() the file.
@link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#including-files-with-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