Cake php 1.2-cheatsheet

1,229 views

Published on

Published in: Technology, Self Improvement
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,229
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Cake php 1.2-cheatsheet

  1. 1. The CheatSheet - CakePHP 1.2Config Model Controller View Models Conventions Core Properties Properties Propertiesdebug $cacheQueries $recursive $action $models Class: singular, camel casedApp.encoding $data $useDbConfig Relationships $autoLayout $name (LineItem, Person)App.baseUrl $belongsTo $name $layout $autoRender $pageTitle $displayField $useTable $base $paramsApp.dir $hasAndBelongsToMany $action $output $id $validate $ext $plugin File: singular, underscoredCache.check $autoLayout $pageTitle $name $validationErrors $hasMany $hasRendered $subDir (line_item.php, person.php)Cache.disable $autoRender $paramsAcl.classname $primaryKey $_schema $hasOne $helpers $themeWeb $base $persistModelAcl.database $cacheAction $plugin $here $uses Table: plural, underscoredRouting.admin $layout $viewPath (line_items, people) Methods $components $usesSession.start $loaded $data $viewSession.save $helpers $viewPath bind(params) invalidFields([data])Session.checkAgent $here $webrootSession.cookie create([data]) isForeignKey(field) MethodsSession.timeout delete([id, cascade]) isUnique(fields, [or]) Controllers addScript (name, [content])Security.level deleteAll(conditions, [cascade, callbacks]) query([sql]) element (name, [params, loadHelpers])Security.salt escapeField(field) read([fields, id]) Methods error (code, name, message) Class: plural, camel cased,Asset.filter.js exists() save([data, options]) ends in "Controller" getVar (var)Asset.filter.css constructClasses() field(name, conditions, order) saveAll([data, options]) getVars ( ) (LineItemsController, header(status) find(type, [options]) saveField([name, value, validate]) renderCache ( lename, timeStart) PeopleController) paginate ([object, scope, whitelist]) render ([action, layout, le]) Index.php getAffectedRows() schema([field]) disableCache() renderLayout(content, [layout]) getAssociated([type]) set(one, [two]) postConditions(data) File: plural, underscoredCAKE_CORE_INCLUDE_PATH set (one, [tset (one, [two]) (line_items_controller.php, getColumnType(column) setDataSource(dataSource) redirect(url, [status])ROOT people_controller.php) getInsertID() setSource(tableName) referer([default, local])WWW_ROOTWEBROOT_DIR getNumRows() unbindModel(params, [reset]) render([action, layout, le]) hasAny([conditions]) updateAll(fields, [conditions]) set(one, [two]) Paths hasField(name) invalidate(field) updateCounterCache([keys, created]) validates([options]) setAction (action, [param, param, param]) validate() Helper Properties Views validateErrors()APP $base $webroot Path: controller name, underscoredAPP_DIR Custom Find Types: all, first, count, list, threaded, neighbors $here $params (app/views/line_items/<file>,APP_PATH $action $data app/views/people/<file>)CACHE Callbacks Callbacks $themeWeb $pluginCAKE $viewCOMPONENTS beforeDelete() afterFind(results, primary) afterSave() File: action name, underscored beforeFilter()CONFIGS afterDelete() beforeValidate() beforeRender() (index.ctp, view.ctp,CONTROLLER_TESTS beforeFind(query) beforeSave() afterFilter() Methods admin_index.ctp)CONTROLLERSCSS url([url, full])ELEMENTS webroot(file)HELPER_TESTS clean(text) Global Functions ComponentHELPERS value([field/options, field, key])INFLECTIONSJS PropertiesLAYOUTS $enabled CallbacksLIB_TESTS config(fileName) __n(singular, plural, count, [return])LIBS debug(message, [escape]) __d(domain, msg, [return]) afterRender()LOGS beforeLayout() Callbacks pr(string | array | object) __dn(domain, singular, plural, count,MODEL_TESTS e(message) [return]) afterLayout()MODELS h(string | array) __dc(domain, msg, category,[return]) initialize(&controller)TESTS am(array, [array, array]) __dcn(domain, singular, plural, startup(&controller)TMP cache(path, data, expires, [target]) count,category, [return]) beforeRender(&controller)VENDORSVIEWS clearCache([params, type, ext]) __c(msg, category, [return]) beforeRedirect(&controller) shutdown(&controller) env(HTTP_HEADER) __(singular, [return])

×