cakephp_cakesheet.pdf

(374 KB) Pobierz
332049378 UNPDF
CakePHP Naming Conventions
Global Functions
Models
Controllers
Views
config ('file_name')
uses ('file_name')
vendor ('file_name')
debug ('message')
a (element, [element, element])
aa (key, value, [key, value])
e ('message')
low ('STRING')
up ('string')
r ('search', 'replace', 'text')
pr (array)
am (array, [array, array])
env ('HTTP_HEADER')
cache (path, data, expires, [target])
clearCache ([params, type, ext])
countdim (array)
Class Name: singular, camel cased
(LineItem, Person)
Class Name: plural, camel cased,
ends in "Controller"
(LineItemsController, People Controller)
Path: controller name, underscored
(app/views/line_items/<file>, app/
views/people/<file>)
File Name: singular, underscored
(line_item.php, person.php)
File Name: plural, underscored
(line_items_controller.php,
people_controller.php)
Table Name: plural, underscored
(line_items, people)
File Name: action name, lowercase
(index.thtml, view.thtml)
Model
Controller
View
Properties
Properties
Properties
$cacheQueries
$data
$displayField
$recursive
$useDbConfig
$useTable
$validate
$validationErrors
Association Properties
$name
$action
$action
$autoLayout
$belongsTo
$autoLayout
$autoRender
$autoRender
$base
$hasAndBelongsToMany
$hasMany
$hasOne
$base
$beforeFilter
$controller
$ext
$id
$name
$primaryKey
$cacheAction
$components
$hasRendered
$helpers
$data
$helpers
$here
$layout
$_tableInfo
$here
$layout
$loaded
$models
Methods
$output
$pageTitle
$name
$pageTitle
$params
$persistModel
$params
$parent
bindModel (params)
create ( )
delete (id, [cascade])
escapeField (field)
execute (data)
exists ( )
field (name, conditions, order)
find ([conditions, fields, order, recursive])
findAll ([conditions, fields, order, limit, page, recur...])
findAllThreaded([conditions, fields, sort])
findCount ([conditions, recursive])
findNeighbours (conditions, field, value)
generateList ([conditions, order, limit, keyPath, val...])
getA f ectedRows ( )
getColumnType (column)
getColumnTypes ( )
getDisplayField ( )
getID ([list])
getLastInsertID ( )
$plugin
$subDir
$plugin
$uses
getNumRows ( )
hasAny ([conditions])
hasField (name)
invalidate (field)
invalidFields ([data])
$view
$viewPath
$themeWeb
$uses
$webroot
$viewPath
Methods
Methods
cleanUpFields ( )
constructClasses ( )
flash (message, url, [pause])
flashOut (message, url, [pause])
generateFieldNames (data, doCreateO...)
postConditions (data)
redirect (url, [status])
referer ([default, local])
render([action, layout, file])
set (one, [two])
setAction (action, [param, param, param])
validate ( )
validateErrors ( )
element (name)
error (code, name, message)
pluginView (action, layout)
render ([action, layout, file])
renderCache (filename, timeStart)
renderElement (name, [params])
renderLayout (content_for_layout)
setLayout (layout)
isForeignKey (field)
loadInfo ( )
query ([sql])
read ([fields, id])
remove ([id, cascade])
save ([data, validate, fieldList])
saveField ([name, value, validate])
set (one, [two])
setDataSource (dataSource)
setSource (tableName)
unbindModel (params)
validates ([data])
Helper
Callbacks
Availability: View only
Callbacks
beforeDelete ( ) afterDelete ( )
beforeFind (&qu..) afterFind (results)
beforeSave ( )
afterSave ( )
Properties
beforeFilter ( )
beforeRender ( )
beforeValidate ( )
$tags
afterFilter ( )
$base
Global Constants
$here
$action
$themeWeb
Core Defines
Component
Paths
$view
ACL_CLASSNAME
ACL_FILENAME
AUTO_SESSION
CACHE_CHECK
APP
INFLECTIONS
JS
LAYOUTS
LIB_TESTS
LIBS
LOGS
CAKE_SESSION_STRING
CAKE_SESSION_TABLE
CAKE_SESSION_TIMEOUT
COMPRESS_CSS
DEBUG
LOG_ERROR
Availability: Controller / View
$webroot
APP_DIR
APP_PATH
CACHE
CAKE
COMPONENTS
CONFIGS
CONTROLLER_TESTS
CONTROLLERS
CSS
ELEMENTS
HELPER_TESTS
HELPERS
Properties
$params
$data
$disableStartup
$plugin
CAKE_ADMIN
Callbacks
CAKE_SECURITY
startup (&controller)
Callbacks
afterRender ( )
CAKE_SESSION_COOKIE
MAX_MD5SIZE
MODEL_TESTS
Conventions
CAKE_SESSION_SAVE
WEBSERVICES
MODELS
SCRIPTS
TESTS
TMP
Class Name: MyCoolComponent
Path: app/controllers/components/ my_cool.php
Conventions
Class Name: MyCoolHelper
Path: app/views/helpers/ my_cool.php
Webroot Configurable Paths
CORE_PATH ROOT
WWW_ROOT WEBROOT_DIR
CAKE_CORE_INCLUDE_PATH
Usage
VENDORS
Controller: $this->MyCool->method( );
View: $this->controller->MyCool->method( );
Usage
View: $myCool->method( );
VIEWS
Copyright © 2006, Cake Software Foundation
332049378.165.png 332049378.176.png 332049378.187.png 332049378.198.png 332049378.001.png 332049378.012.png 332049378.023.png 332049378.034.png 332049378.045.png 332049378.056.png 332049378.067.png 332049378.078.png 332049378.089.png 332049378.100.png 332049378.111.png 332049378.122.png 332049378.127.png 332049378.128.png 332049378.129.png 332049378.130.png 332049378.131.png 332049378.132.png 332049378.133.png 332049378.134.png 332049378.135.png 332049378.136.png 332049378.137.png 332049378.138.png 332049378.139.png 332049378.140.png 332049378.141.png 332049378.142.png 332049378.143.png 332049378.144.png 332049378.145.png 332049378.146.png 332049378.147.png 332049378.148.png 332049378.149.png 332049378.150.png 332049378.151.png 332049378.152.png 332049378.153.png 332049378.154.png 332049378.155.png 332049378.156.png 332049378.157.png 332049378.158.png 332049378.159.png 332049378.160.png 332049378.161.png 332049378.162.png 332049378.163.png 332049378.164.png 332049378.166.png 332049378.167.png 332049378.168.png 332049378.169.png 332049378.170.png 332049378.171.png 332049378.172.png 332049378.173.png 332049378.174.png 332049378.175.png 332049378.177.png 332049378.178.png 332049378.179.png 332049378.180.png 332049378.181.png 332049378.182.png 332049378.183.png 332049378.184.png 332049378.185.png 332049378.186.png 332049378.188.png 332049378.189.png 332049378.190.png 332049378.191.png 332049378.192.png 332049378.193.png 332049378.194.png 332049378.195.png 332049378.196.png 332049378.197.png 332049378.199.png 332049378.200.png 332049378.201.png 332049378.202.png 332049378.203.png 332049378.204.png 332049378.205.png 332049378.206.png 332049378.207.png 332049378.208.png 332049378.002.png 332049378.003.png 332049378.004.png 332049378.005.png 332049378.006.png 332049378.007.png 332049378.008.png 332049378.009.png 332049378.010.png 332049378.011.png 332049378.013.png 332049378.014.png 332049378.015.png 332049378.016.png 332049378.017.png 332049378.018.png 332049378.019.png 332049378.020.png 332049378.021.png 332049378.022.png 332049378.024.png 332049378.025.png 332049378.026.png 332049378.027.png 332049378.028.png 332049378.029.png 332049378.030.png 332049378.031.png 332049378.032.png 332049378.033.png 332049378.035.png 332049378.036.png 332049378.037.png 332049378.038.png 332049378.039.png 332049378.040.png 332049378.041.png 332049378.042.png 332049378.043.png 332049378.044.png 332049378.046.png 332049378.047.png 332049378.048.png 332049378.049.png 332049378.050.png 332049378.051.png 332049378.052.png 332049378.053.png 332049378.054.png 332049378.055.png 332049378.057.png 332049378.058.png 332049378.059.png 332049378.060.png 332049378.061.png 332049378.062.png 332049378.063.png 332049378.064.png 332049378.065.png 332049378.066.png 332049378.068.png 332049378.069.png 332049378.070.png 332049378.071.png 332049378.072.png 332049378.073.png 332049378.074.png 332049378.075.png 332049378.076.png 332049378.077.png 332049378.079.png 332049378.080.png 332049378.081.png 332049378.082.png 332049378.083.png 332049378.084.png 332049378.085.png 332049378.086.png 332049378.087.png 332049378.088.png 332049378.090.png 332049378.091.png 332049378.092.png 332049378.093.png 332049378.094.png 332049378.095.png 332049378.096.png 332049378.097.png 332049378.098.png 332049378.099.png 332049378.101.png 332049378.102.png 332049378.103.png 332049378.104.png 332049378.105.png 332049378.106.png 332049378.107.png 332049378.108.png 332049378.109.png 332049378.110.png 332049378.112.png 332049378.113.png 332049378.114.png 332049378.115.png 332049378.116.png 332049378.117.png 332049378.118.png 332049378.119.png 332049378.120.png 332049378.121.png 332049378.123.png 332049378.124.png 332049378.125.png 332049378.126.png
Zgłoś jeśli naruszono regulamin