CakePHP
Downloads
Latest Release
CakePHP 1.2
Download
|
Tickets
CakePHP 1.3
Download
|
Tickets
CakePHP 2.0
Tickets
Documentation
API
1.1
|
1.2
|
1.3
|
2.0
Book
1.1
|
1.2
|
1.3
|
2.0
Tickets
Translations
Community
Bakery
Contributors
Google Groups
Logo
Planet
Q & A
TV (Screencasts)
Services
Certification
Consultation
Support
Training
Login
Register
English
Arabic (Egypt)
Bulgarian
Chinese
Czech
German (Standard)
Greek
English
Spanish (Spain - Traditional)
Farsi
French (Standard)
Hungarian
Indonesian
Italian
Japanese
Korean
Malaysian
Dutch (Standard)
Portuguese (Portugal)
Polish
Romanian
Russian
Slovak
Turkish
Chinese (Taiwan)
Welcome to the Cookbook
The 1.3 Book
The 1.2 Book
The 1.1 Book
The 2.0 Book
Clear Local Cache
1 Początki z CakePHP
1.1 Czym jest CakePHP? Dlaczego warto go stosować?
1.2 Gdzie szukać pomocy
1.3 Objaśnienie architektury Model-View-Controller
1.3.1 Korzyści
2 Podstawowe zasady CakePHP
2.1 Struktura CakePHP
2.1.1 Rozszerzenia kontrolerów ("Komponenty")
2.1.2 Rozszerzenia widoków ("Pomocnicy")
2.1.3 Rozszerzenia modeli ("Zachowania")
2.1.4 Rozszerzenia Aplikacji
2.2 Typowy przepływ sterowania w CakePHP
2.3 Struktura folderów w CakePHP
2.3.1 Folder App
2.4 Konwencje CakePHP
2.4.1 Konwencje nazewnictw plików i klas
2.4.2 Konwencje nazewnicze modeli i baz danych
2.4.3 Konwencja nazewnictw Kontrolerów
2.4.3.1 Rozważania o ścieżkach URL dla nazw kontrolerów
2.4.4 Konwencja nazewnictw Widoków
3 Praca z CakePHP
3.1 Wymagania
3.2 Przygotowanie do instalacji.
3.2.1 Pobranie CakePHP
3.2.2 Prawa dostępu.
3.3 Instalacja
3.3.1 Rozwojowa (Development)
3.3.2 Produkcyjna (Production)
3.3.3 Zaawansowana
3.3.3.1 Ścieżki dostępu dla Dodatkowych Klas
3.3.4 Apache and mod_rewrite (and .htaccess)
3.3.5 Pretty URLs and Lighttpd
3.3.6 Pretty URLs on nginx
3.3.7 Fire It Up
3.4 Konfiguracja
3.4.1 Konfiguracja bazy danych
3.4.2 Core Configuration
3.4.3 The Configuration Class
3.4.3.1 Configure Methods
3.4.3.1.1 write
3.4.3.1.2 read
3.4.3.1.3 delete
3.4.3.1.4 load
3.4.3.1.5 version
3.4.3.2 CakePHP Core Configuration Variables
3.4.3.3 Configuration Constants
3.4.4 The App Class
3.4.4.1 Użycie App::import()
3.4.4.2 Import bibliotek jądra
3.4.4.3 Importing Controllers, Models, Components, Behaviors, and Helpers
3.4.4.3.1 Loading Controllers
3.4.4.3.2 Loading Models
3.4.4.3.3 Loading Components
3.4.4.3.4 Loading Behaviors
3.4.4.3.5 Loading Helpers
3.4.4.4 Loading from Plugins
3.4.4.5 Loading Vendor Files
3.4.4.5.1 Vendor examples
3.4.5 Routes Configuration
3.4.5.1 Default Routing
3.4.5.2 Named parameters
3.4.5.3 Defining Routes
3.4.5.4 Passing parameters to action
3.4.5.5 Prefix Routing
3.4.5.6 Plugin routing
3.4.5.7 File extensions
3.4.6 Inflections
3.4.7 Bootstrapping CakePHP
3.5 Kontrolery
3.5.1 Introduction
3.5.2 The App Controller
3.5.3 The Pages Controller
3.5.4 Controller Attributes
3.5.4.1 $name
3.5.4.2 $components, $helpers and $uses
3.5.4.3 Page-related Attributes: $layout and $pageTitle
3.5.4.4 The Parameters Attribute ($params)
3.5.4.4.1 form
3.5.4.4.2 admin
3.5.4.4.3 bare
3.5.4.4.4 isAjax
3.5.4.4.5 controller
3.5.4.4.6 action
3.5.4.4.7 pass
3.5.4.4.8 url
3.5.4.4.9 data
3.5.4.4.10 prefix
3.5.4.4.11 named
3.5.4.5 Other Attributes
3.5.4.6 persistModel
3.5.5 Controller Methods
3.5.5.1 Interacting with Views
3.5.5.1.1 set
3.5.5.1.2 render
3.5.5.2 Flow Control
3.5.5.2.1 redirect
3.5.5.2.2 flash
3.5.5.3 Callbacks
3.5.5.4 Other Useful Methods
3.5.5.4.1 constructClasses
3.5.5.4.2 referer
3.5.5.4.3 disableCache
3.5.5.4.4 postConditions
3.5.5.4.5 paginate
3.5.5.4.6 requestAction
3.5.5.4.7 loadModel
3.6 Komponenty
3.6.1 Wprowadzenie
3.6.2 Konfigurowanie Komponentów
3.6.3 Component callbacks
3.6.4 Tworzenie Komponentów
3.6.4.1 Używanie Komponentów w Kontrolerach
3.6.4.2 MVC Class Access Within Components
3.6.4.3 Używanie innych Komponentów w twoim Komponencie
3.7 Modele
3.7.1 Zrozumienie Modeli
3.7.2 Creating Database Tables
3.7.2.1 Data Type Associations by Database
3.7.2.1.1 MySQL
3.7.2.1.2 MySQLi
3.7.2.1.3 ADOdb
3.7.2.1.4 DB2
3.7.2.1.5 Firebird/Interbase
3.7.2.1.6 MS SQL
3.7.2.1.7 Oracle
3.7.2.1.8 PostgreSQL
3.7.2.1.9 SQLite
3.7.2.1.10 Sybase
3.7.2.2 Titles
3.7.2.3 created and modified
3.7.2.4 Using UUIDs as Primary Keys
3.7.3 Retrieving Your Data
3.7.3.1 find
3.7.3.1.1 find('first')
3.7.3.1.2 find('count')
3.7.3.1.3 find('all')
3.7.3.1.4 find('list')
3.7.3.1.5 find('threaded')
3.7.3.1.6 find('neighbors')
3.7.3.2 findAllBy
3.7.3.3 findBy
3.7.3.4 query
3.7.3.5 field
3.7.3.6 read()
3.7.3.7 Complex Find Conditions
3.7.4 Saving Your Data
3.7.4.1 Saving Related Model Data (hasOne, hasMany, belongsTo)
3.7.4.1.1 counterCache - Cache your count()
3.7.4.2 Saving Related Model Data (HABTM)
3.7.5 Usuwanie danych
3.7.5.1 delete
3.7.5.2 remove
3.7.5.3 deleteAll
3.7.6 Associations: Linking Models Together
3.7.6.1 Relationship Types
3.7.6.2 hasOne
3.7.6.3 belongsTo
3.7.6.4 hasMany
3.7.6.5 hasAndBelongsToMany (HABTM)
3.7.6.6 Creating and Destroying Associations on the Fly
3.7.6.7 Multiple relations to the same model
3.7.6.8 Joining tables
3.7.7 Callback Methods
3.7.7.1 beforeFind
3.7.7.2 afterFind
3.7.7.3 beforeValidate
3.7.7.4 beforeSave
3.7.7.5 afterSave
3.7.7.6 beforeDelete
3.7.7.7 afterDelete
3.7.7.8 onError
3.7.8 Model Attributes
3.7.8.1 useDbConfig
3.7.8.2 useTable
3.7.8.3 tablePrefix
3.7.8.4 primaryKey
3.7.8.5 displayField
3.7.8.6 recursive
3.7.8.7 order
3.7.8.8 data
3.7.8.9 _schema
3.7.8.10 validate
3.7.8.11 name
3.7.8.12 cacheQueries
3.7.9 Additional Methods and Properties
3.8 Behaviors
3.8.1 Using Behaviors
3.8.2 Creating Behaviors
3.8.3 Creating behavior methods
3.9 DataSources
3.9.1 Basic API For DataSources
3.9.2 An Example
3.10 Widoki
3.10.1 Szablony Widoków
3.10.2 Kompozycje
3.10.3 Elements
3.10.3.1 Passing Variables into an Element
3.10.3.2 Caching Elements
3.10.3.3 Requesting Elements from a Plugin
3.10.4 View methods
3.10.4.1 set()
3.10.4.2 getVar()
3.10.4.3 getVars()
3.10.4.4 error()
3.10.4.5 element()
3.10.4.6 uuid()
3.10.4.7 addScript()
3.10.5 Themes
3.10.6 Media Views
3.11 Helpers
3.11.1 Using Helpers
3.11.2 Creating Helpers
3.11.2.1 Including other Helpers
3.11.2.2 Callback method
3.11.2.3 Using your Helper
3.11.3 Creating Functionality for All Helpers
3.11.4 Core Helpers
3.12 Scaffolding
3.12.1 Creating a simple admin interface with scaffolding
3.12.2 Customizing Scaffold Views
3.13 The CakePHP Console
3.13.1 Creating Shells & Tasks
3.13.1.1 Creating Your Own Shells
3.13.1.2 Tasks
3.13.2 Running Shells as cronjobs
3.14 Plugins
3.14.1 Creating a Plugin
3.14.2 Plugin Controllers
3.14.3 Plugin Models
3.14.4 Plugin Views
3.14.5 Components, Helpers and Behaviors
3.14.6 Plugin Images, CSS and Javascript
3.14.7 Plugin Tips
3.15 Global Constants and Functions
3.15.1 Global Functions
3.15.1.1 __
3.15.1.2 a
3.15.1.3 aa
3.15.1.4 am
3.15.1.5 config
3.15.1.6 convertSlash
3.15.1.7 countdim
3.15.1.8 debug
3.15.1.9 e
3.15.1.10 env
3.15.1.11 fileExistsInPath
3.15.1.12 h
3.15.1.13 ife
3.15.1.14 low
3.15.1.15 paths
3.15.1.16 pr
3.15.1.17 r
3.15.1.18 stripslashes_deep
3.15.1.19 up
3.15.1.20 uses
3.15.2 Core Definition Constants
4 Podstawowe czynności w CakePHP
4.1 Weryfikacja danych
4.1.1 Proste zasady
4.1.2 One Rule Per Field
4.1.2.1 rule
4.1.2.2 required
4.1.2.3 allowEmpty
4.1.2.4 on
4.1.2.5 message
4.1.2.6 last
4.1.3 Multiple Rules per Field
4.1.4 Core Validation Rules
4.1.4.1 alphaNumeric
4.1.4.2 between
4.1.4.3 blank
4.1.4.4 boolean
4.1.4.5 cc
4.1.4.6 comparison
4.1.4.7 date
4.1.4.8 decimal
4.1.4.9 email
4.1.4.10 equalTo
4.1.4.11 extension
4.1.4.12 file
4.1.4.13 ip
4.1.4.14 isUnique
4.1.4.15 minLength
4.1.4.16 maxLength
4.1.4.17 money
4.1.4.18 multiple
4.1.4.19 inList
4.1.4.20 numeric
4.1.4.21 notEmpty
4.1.4.22 phone
4.1.4.23 postal
4.1.4.24 range
4.1.4.25 ssn
4.1.4.26 url
4.1.5 Custom Validation Rules
4.1.5.1 Custom Regular Expression Validation
4.1.5.2 Adding your own Validation Methods
4.1.6 Validating Data from the Controller
4.2 Oczyszanie danych
4.2.1 paranoid
4.2.2 html
4.2.3 escape
4.2.4 clean
4.3 Error Handling
4.4 Debugging
4.4.1 Basic Debugging
4.4.2 Using the Debugger Class
4.4.3 Debugger Class
4.5 Caching
4.6 Logging
4.6.1 Using the log function
4.7 Testowanie
4.7.1 Przygotowanie do testowania
4.7.1.1 Instalacja biblioteki SimpleTest
4.7.1.2 Running Core test cases
4.7.2 Testing overview - Unit testing vs. Web testing
4.7.3 Preparing test data
4.7.3.1 About fixtures
4.7.3.2 Creating fixtures
4.7.3.3 Importing table information and records
4.7.4 Creating tests
4.7.4.1 CakeTestCase Callback Methods
4.7.5 Testowanie modeli
4.7.5.1 Creating a test case
4.7.5.2 Creating a test method
4.7.6 Testing controllers
4.7.6.1 Creating a test case
4.7.6.2 The testAction method
4.7.6.3 Pitfalls
4.7.7 Testing Helpers
4.7.7.1 Creating Helper test, part I
4.7.8 Testing components
4.7.8.1 Initializing the component
4.7.8.2 Creating a test method
4.7.9 Web testing - Testing views
4.7.9.1 About CakeWebTestCase
4.7.9.2 Creating a test
4.7.9.3 Walking through a page
4.7.10 Testing plugins
4.7.11 Miscellaneous
4.7.11.1 Customizing the test reporter
4.7.11.2 Grouping tests
4.7.12 Running tests in the Command Line
4.8 Internationalization & Localization
4.8.1 Internationalizing Your Application
4.8.2 Localization in CakePHP
4.9 Pagination
4.9.1 Controller Setup
4.9.2 Pagination in Views
4.9.3 AJAX Pagination
4.9.3.1 Layout Changes
4.9.3.2 View Changes
4.9.4 Custom Query Pagination
4.10 REST
4.10.1 The Simple Setup
4.10.2 Custom REST Routing
5 Core Components
5.1 Access Control Lists
5.1.1 Understanding How ACL Works
5.1.2 Defining Permissions: Cake's INI-based ACL
5.1.3 Defining Permissions: Cake's Database ACL
5.1.3.1 Getting Started
5.1.3.2 Creating Access Request Objects (AROs) and Access Control Objects (ACOs)
5.1.3.3 Assigning Permissions
5.1.3.4 Checking Permissions: The ACL Component
5.2 Authentication
5.2.1 Setting Auth Component Variables
5.2.2 Displaying Auth Error Messages
5.2.3 Troubleshooting Auth Problems
5.2.4 Change Hash Function
5.2.5 AuthComponent Methods
5.2.5.1 action
5.2.5.2 allow
5.2.5.3 deny
5.2.5.4 hashPasswords
5.2.5.5 mapActions
5.2.5.6 login
5.2.5.7 logout
5.2.5.8 password
5.2.5.9 user
5.2.6 Właściwości komponentu Auth
5.2.6.1 userModel
5.2.6.2 fields
5.2.6.3 userScope
5.2.6.4 loginAction
5.2.6.5 loginRedirect
5.2.6.6 logoutRedirect
5.2.6.7 loginError
5.2.6.8 authError
5.2.6.9 autoRedirect
5.2.6.10 authorize
5.2.6.11 sessionKey
5.2.6.12 ajaxLogin
5.2.6.13 authenticate
5.2.6.14 actionPath
5.3 Cookies
5.3.1 Controller Setup
5.3.2 Using the Component
5.4 Email
5.4.1 Atrybuty oraz zmienne
5.4.1.1 Sending Multiple Emails in a loop
5.4.2 Wysyłanie prostej wiadomości pocztowej
5.4.2.1 Setting up the Layouts
5.4.2.2 Setup an email element for the message body
5.4.2.3 Kontroler
5.4.3 Sending A Message Using SMTP
5.5 Request Handling
5.5.1 Obtaining Request Information
5.5.2 Request Type Detection
5.5.3 Obtaining Additional Client Information
5.5.4 Responding To Requests
5.6 Security Component
5.6.1 Configuration
5.6.2 Methods
5.6.2.1 requirePost()
5.6.2.2 requireSecure()
5.6.2.3 requireAuth()
5.6.2.4 requireLogin()
5.6.2.5 loginCredentials(string $type)
5.6.2.6 loginRequest(array $options)
5.6.2.7 parseDigestAuthData(string $digest)
5.6.2.8 generateDigestResponseHash(array $data)
5.6.2.9 blackHole(object $controller, string $error)
5.6.3 Usage
5.6.4 Basic HTTP Authentication
5.7 Sessions
5.7.1 Methods
5.7.1.1 write
5.7.1.2 setFlash
5.7.1.3 read
5.7.1.4 check
5.7.1.5 delete
5.7.1.6 destroy
5.7.1.7 error
6 Podstawowe Zachowania
6.1 ACL
6.1.1 Using the AclBehavior
6.1.2 node()
6.2 Containable
6.3 Translate
6.3.1 Inicjalizacja tabeli tłumaczeń (i18n) w bazie
6.3.2 Dołączanie zachowania Translate do swoich modeli
6.3.3 Defining the Fields
6.3.4 Conclusion
6.3.5 Retrieve all translation records for a field
6.3.5.1 Using the bindTranslation method
6.3.6 Saving in another language
6.3.7 Multiple Translation Tables
6.3.7.1 Create the TranslateModel
6.3.7.2 Changing the Table
6.4 Tree
6.4.1 Requirements
6.4.2 Basic Usage
6.4.2.1 Adding data
6.4.2.2 Modifying data
6.4.2.3 Deleting data
6.4.2.4 Querying and using your data
6.4.2.4.1 Children
6.4.2.4.2 Counting children
6.4.2.4.3 generatetreelist
6.4.2.4.4 getparentnode
6.4.2.4.5 getpath
6.4.3 Advanced Usage
6.4.3.1 moveDown
6.4.3.2 moveUp
6.4.3.3 removeFromTree
6.4.3.4 reorder
6.4.4 Data Integrity
7 Core Helpers
7.1 AJAX
7.1.1 AjaxHelper Options
7.1.1.1 General Options
7.1.1.2 Callback Options
7.1.2 Metody
7.1.2.1 link
7.1.2.2 remoteFunction
7.1.2.3 remoteTimer
7.1.2.4 form
7.1.2.5 submit
7.1.2.6 observeField
7.1.2.7 observeForm
7.1.2.8 autoComplete
7.1.2.9 isAjax
7.1.2.10 drag & drop
7.1.2.11 slider
7.1.2.12 editor
7.1.2.13 sortable
7.2 Cache
7.2.1 General Caching
7.2.2 Cache Engines in Cake
7.2.3 Cache Helper Configuration
7.2.4 Caching in the Controller
7.2.5 Marking Non-Cached Content in Views
7.2.6 Clearing the Cache
7.3 Form
7.3.1 Creating Forms
7.3.1.1 $options[‘type’]
7.3.1.2 $options[‘action’]
7.3.1.3 $options[‘url’]
7.3.1.4 $options[‘default’]
7.3.2 Closing the Form
7.3.3 Automagic Form Elements
7.3.3.1 Field naming convention
7.3.3.2 $options[‘type’]
7.3.3.3 $options[‘before’], $options[‘between’], $options[‘separator’] and $options[‘after’]
7.3.3.4 $options[‘options’]
7.3.3.5 $options[‘multiple’]
7.3.3.6 $options[‘maxLength’]
7.3.3.7 $options[‘div’]
7.3.3.8 $options[‘label’]
7.3.3.9 $options['legend']
7.3.3.10 $options[‘id’]
7.3.3.11 $options['error']
7.3.3.12 $options['default']
7.3.3.13 $options[‘selected’]
7.3.3.14 $options[‘rows’], $options[‘cols’]
7.3.3.15 $options[‘empty’]
7.3.3.16 $options[‘timeFormat’]
7.3.3.17 $options[‘dateFormat’]
7.3.3.18 $options['minYear'], $options['maxYear']
7.3.3.19 $options['interval']
7.3.3.20 $options['class']
7.3.4 File Fields
7.3.4.1 Validating Uploads
7.3.5 Form Element-Specific Methods
7.3.5.1 checkbox
7.3.5.2 button
7.3.5.3 year
7.3.5.4 month
7.3.5.5 dateTime
7.3.5.6 day
7.3.5.7 hour
7.3.5.8 minute
7.3.5.9 meridian
7.3.5.10 error
7.3.5.11 file
7.3.5.12 hidden
7.3.5.13 isFieldError
7.3.5.14 label
7.3.5.15 password
7.3.5.16 radio
7.3.5.17 select
7.3.5.18 submit
7.3.5.19 text
7.3.5.20 textarea
7.4 HTML
7.4.1 Inserting Well-Formatted elements
7.4.1.1 charset
7.4.1.2 css
7.4.1.3 meta
7.4.1.4 docType
7.4.1.5 style
7.4.1.6 image
7.4.1.7 link
7.4.1.8 tag
7.4.1.9 div
7.4.1.10 para
7.4.1.11 tableHeaders
7.4.1.12 tableCells
7.4.1.13 url
7.4.2 Changing the tags output by HtmlHelper
7.5 Javascript
7.5.1 Methods
7.6 Number
7.6.1 currency
7.6.2 precision
7.6.3 toPercentage
7.6.4 toReadableSize
7.6.5 format
7.7 Paginator
7.7.1 Methods
7.8 RSS
7.8.1 Creating an RSS feed with the RssHelper
7.8.1.1 Controller Code
7.8.1.1.1 Layout
7.8.1.1.2 View
7.9 Session
7.9.1 Methods
7.9.2 flash
7.9.2.1 Using Flash for Success and Failure
7.10 Text
7.11 Time
7.11.1 Formatting
7.11.2 Testing Time
7.12 XML
7.12.1 serialize
7.12.2 elem
7.12.3 header
8 Core Utility Libraries
8.1 App
8.2 Inflector
8.2.1 Class methods
8.3 String
8.3.1 uuid
8.3.2 tokenize
8.3.3 insert
8.3.4 cleanInsert
8.4 Xml
8.4.1 Xml parsing
8.5 Set
8.5.1 Set-compatible Path syntax
8.5.2 insert
8.5.3 sort
8.5.4 reverse
8.5.5 combine
8.5.6 normalize
8.5.7 countDim
8.5.8 isEqual
8.5.9 diff
8.5.10 check
8.5.11 remove
8.5.12 classicExtract
8.5.13 matches
8.5.14 extract
8.5.15 format
8.5.16 enum
8.5.17 numeric
8.5.18 map
8.5.19 pushDiff
8.5.20 filter
8.5.21 merge
8.5.22 contains
8.6 Security
8.7 Cache
8.7.1 Cache::read()
8.7.2 Cache::write()
8.7.3 Cache::delete()
8.7.4 Cache::config()
8.7.5 Cache::set()
8.8 HttpSocket
8.8.1 get
8.8.2 post
8.8.3 request
9 Core Console Applications
9.1 Code Generation with Bake
9.2 Schema management and migrations
9.2.1 Generowanie i korzystanie z plików schematu
9.2.2 Migrations with CakePHP schema shell
9.3 Modify default HTML produced by "baked" templates
10 Podręczniki i Przykłady
10.1 Blog
10.1.1 Zdobycie ciastka
10.1.2 Utworzenie bazy danych bloga
10.1.3 Konfiguracja bazy danych Cake`a
10.1.4 Opcjonalna konfiguracja
10.1.5 A Note on mod_rewrite
10.1.6 Tworzenie klasy Post
10.1.7 Create a Posts Controller
10.1.8 Creating Post Views
10.1.9 Adding Posts
10.1.10 Data Validation
10.1.11 Usuwanie postów
10.1.12 Editing Posts
10.1.13 Routes
10.1.14 Wniosek
10.2 Simple Acl controlled Application
10.2.1 Preparing our Application
10.2.2 Preparing to Add Auth
10.2.3 Initialize the Db Acl tables
10.2.4 Acts As a Requester
10.2.5 Creating ACOs
10.2.6 An Automated tool for creating ACOs
10.2.7 Setting up permissions
10.2.8 Logging in
10.2.9 Wylogowanie
10.2.10 Gotowe.
11 Dodatki
11.1 Migracja z CakePHP 1.1 do 1.2
11.1.1 Configure
11.1.2 HTML Helper do Form Helper
11.1.3 Ładowanie plików
11.1.4 Model::generateList()
11.1.5 Możliwe podejście migracji
3.5 Kontrolery
Edit
Comments (0)
History
Compare to original content
« Bootstrapping CakePHP
|
Introduction »