CakePHP Cookbook Documentation 5.xCoding Standards Adding New Features IDE Setup Indentation Line Length Control Structures Comparison Function Calls Method Definition Bail Early Method Chaining Commenting Code Including Files PHP Tags Naming Anonymous Listeners Interacting with Existing Listeners Establishing Priorities Getting Event Data as Function Parameters Dispatching Events Stopping Events Getting Event Results Removing Callbacks and Listeners rendering process to the View layer. An example of a user registration controller would be: public function add() { $user = $this->Users->newEmptyEntity(); if ($this->request->is('post')) {0 码力 | 1080 页 | 939.39 KB | 1 年前3
CakePHP Cookbook Documentation 5.xwould be: 2 Chapter 1. CakePHP at a Glance CakePHP Cookbook Documentation, Release 5.x public function add() { $user = $this->Users->newEmptyEntity(); if ($this->request->is('post')) { $user = $th check out the code of the test cases provided with CakePHP. They can serve as practical examples for function and data member usage for a class. tests/TestCase/ Additional Reading 5 CakePHP Cookbook Documentation The viewAll() function of the ArticlesController class will look for a view template in templates/Articles/view_all.php. The basic pattern is templates/Controller/underscored_function_name.php. Note:0 码力 | 848 页 | 2.53 MB | 1 年前3
CakePHP Cookbook 4.x
Coding Standards Adding New Features IDE Setup Indentation Line Length Control Structures Comparison Function Calls Method Definition Bail Early Method Chaining Commenting Code Including Files PHP Tags Naming Anonymous Listeners Interacting with Existing Listeners Establishing Priorities Getting Event Data as Function Parameters Dispatching Events Stopping Events Getting Event Results Removing Callbacks and Listeners rendering process to the View layer. An example of a user registration controller would be: public function add() { $user = $this->Users->newEmptyEntity(); if ($this->request->is('post')) {0 码力 | 1249 页 | 1.04 MB | 1 年前3
CakePHP Cookbook 4.x
would be: 2 Chapter 1. CakePHP at a Glance CakePHP Cookbook Documentation, Release 4.x public function add() { $user = $this->Users->newEmptyEntity(); if ($this->request->is('post')) { $user = $th check out the code of the test cases provided with CakePHP. They can serve as practical examples for function and data member usage for a class. tests/TestCase/ Additional Reading 5 CakePHP Cookbook Documentation The viewAll() function of the ArticlesController class will look for a view template in templates/Articles/view_all.php. The basic pattern is templates/Controller/underscored_function_name.php. Note:0 码力 | 967 页 | 2.88 MB | 1 年前3
CakePHP Cookbook 3.x
would be: 2 Chapter 1. CakePHP at a Glance CakePHP Cookbook Documentation, Release 3.10 public function add() { $user = $this->Users->newEntity(); if ($this->request->is('post')) { $user = $this->U check out the code of the test cases provided with CakePHP. They can serve as practical examples for function and data member usage for a class. tests/TestCase/ Additional Reading 5 CakePHP Cookbook Documentation The viewAll() function of the ArticlesController class will look for a view template in src/Template/Articles/view_all.ctp. The basic pattern is src/Template/Controller/underscored_function_name.ctp. Note:0 码力 | 967 页 | 2.80 MB | 1 年前3
CakePHP Cookbook 3.x
Coding Standards Adding New Features IDE Setup Indentation Line Length Control Structures Comparison Function Calls Method Definition Bail Early Method Chaining Commenting Code Including Files PHP Tags Naming Anonymous Listeners Interacting with Existing Listeners Establishing Priorities Getting Event Data as Function Parameters Dispatching Events Stopping Events Getting Event Results Removing Callbacks and Listeners rendering process to the View layer. An example of a user registration controller would be: public function add() { $user = $this->Users->newEntity(); if ($this->request->is('post')) { $user0 码力 | 1244 页 | 1.05 MB | 1 年前3
CakePHP Cookbook 2.x
Coding Standards Language Adding New Features Indentation Line Length Control Structures Comparison Function Calls Method Definition Method Chaining DocBlocks Including Files PHP Tags Naming Convention Backwards array('Html', 'Form'); } Now, let’s add an action to our controller. Actions often represent a single function or interface in an application. For example, when users request www.example.com/posts/index (which public $helpers = array('Html', 'Form'); public function index() { $this->set('posts', $this->Post->find('all')); } } By defining function index() in our PostsController, users can access0 码力 | 1096 页 | 958.62 KB | 1 年前3
CakePHP Cookbook 2.x
array('Html', 'Form'); } Now, let’s add an action to our controller. Actions often represent a single function or interface in an application. For example, when users request www.example.com/posts/index (which AppController { public $helpers = array('Html', 'Form'); public function index() { $this->set('posts', $this->Post->find('all')); } } By defining function index() in our PostsController, users can access the logic logic there by requesting www.example.com/posts/index. Similarly, if we were to define a function called foobar(), users would be able to access that at www.example.com/posts/foobar. Warning: You may0 码力 | 820 页 | 2.52 MB | 1 年前3
共 8 条
- 1













