CakePHP

A Rapid Development Framework

John David Anderson, Cake Documentation Team, cake [at] johndavidanderson [dot] net

Version 0.10.x


Table of Contents

Preface
1. Audience
2. CakePHP is Free
3. Community
1. Introduction to CakePHP
1. What is CakePHP?
2. Why CakePHP?
3. History of CakePHP
2. Basic Concepts
1. The MVC Pattern
2. Overview of the Cake File Layout
3. Installing CakePHP
1. Requirements
1.1. Server Requirements
2. Installing CakePHP
2.1. Getting the most recent stable version
2.2. Unpacking
3. Setting Up CakePHP
3.1. Development Setup
3.2. Production Setup
4. Configuring Apache and mod_rewrite
5. Make Sure It's Working
4. Configuration
1. Database Configuration
2. Global Configuration
3. Routes Configuration
5. Scaffolding
6. Models
1. Model Functions
1.1. User-Defined Functions
1.2. Retrieving Your Data
1.3. Saving Your Data
1.4. Model Callbacks
2. Model Variables
3. Associations
7. Controllers
1. Controller Functions
1.1. Interacting with your Views
1.2. User Redirection
1.3. Controller Callbacks
1.4. Other Useful Functions
2. Controller Variables
8. Views
1. Views
1.1. Layouts
1.2. Elements
9. Helpers
1. Helpers
1.1. HTML
1.1.1. Introduction
1.1.2. Inserting Well-Formatted elements
1.1.3. Forms and Validation
1.2. AJAX
1.3. Javascript
1.4. Number
1.5. Text
1.6. Time
10. Data Validation
1. Data Validation
11. Access Control Lists
1. Understanding How ACL Works
2. Defining Permissions: Cake's INI-based ACL
3. Defining Permissions: Cake's Database ACL
3.1. Getting Started
3.2. Creating Access Request Objects (AROs) and Access Control Objects (ACOs)
3.3. Assigning Permissions
4. Checking Permissions: The ACL Component
12. Data Sanitization
1. Section
13. The Cake Session Component
1. Section
14. The Request Handler Component
1. Section
A. Cake Naming Conventions
1. Models
2. Controllers
3. Views

List of Examples

3.1. Suggested Production httpd.conf
4.1. app/config/database.php
4.2. Route Pattern
4.3. Route Example
4.4. Route Handling in a Controller
4.5. Setting the Default Route
6.1. Example Model Functions
6.2. Custom Sql Calls with findBySQL()
8.1. Calling an Element without parameters
8.2. Calling an Element passing a data array
9.1. Edit Action inside of the NotesController
9.2. Edit View code (edit.thtml) sample
9.3. Concatenating time data before saving a model (excerpt from NotesController)
9.4. AjaxHelper $options Keys
10.1. /app/models/user.php
10.2. Form-handling Action in /app/models/blog_controller.php
10.3. A Form in a View in /app/views/blog/add.thtml
11.1. Initializing your database using acl.php