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 Iniziare con CakePHP
1.1 Cosa è CakePHP? Perché usarlo?
1.2 Dove Cercare Aiuto
1.3 Comprendere il pattern Model-View-Controller
1.3.1 Vantaggi
2 Principi di base di CakePHP
2.1 La struttura di CakePHP
2.1.1 Estensioni dei Controller
2.1.2 Estensioni delle View
2.1.3 Estensioni dei Model
2.1.4 Estensione delle Applicationi
2.2 Una tipica richiesta CakePHP
2.3 Struttura del file di CakePHP
2.3.1 La directory App
2.4 Conventions in CakePHP
2.4.1 Convenzioni per i file e le classi
2.4.2 Convenzioni di Model e Database
2.4.3 Convenzioni Controller
2.4.3.1 URL Considerations for Controller Names
2.4.4 Convenzioni per le View
3 Sviluppare con CakePHP
3.1 Requisiti di sistema
3.2 Preparazione Installazione
3.2.1 Ottenere CakePHP
3.2.2 Permessi
3.3 Installazione
3.3.1 Sviluppo
3.3.2 Produzione
3.3.3 Installazione Avanzata
3.3.3.1 Configurazione di classi esterne
3.3.4 Apache e mod_rewrite
3.3.5 Pretty URLs and Lighttpd
3.3.6 Pretty URLs on nginx
3.3.7 Azione!
3.4 Configurazione
3.4.1 Configurazione del Database
3.4.2 Configurazione dell'applicazione
3.4.3 La classe Configuration
3.4.3.1 Metodi della classe Configure
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 Variabili di configurazione generali in CakePHP
3.4.3.3 Costanti in Configuration
3.4.4 La Classe App
3.4.4.1 Usare App::import()
3.4.4.2 Importing Core Libs
3.4.4.3 Importare Controllers, Models, Components, Behaviors, e Helpers
3.4.4.3.1 Caricare Controllers
3.4.4.3.2 Caricare Models
3.4.4.3.3 Caricare Components
3.4.4.3.4 Caricare Behaviors
3.4.4.3.5 Caricare Helpers
3.4.4.4 Caricare da Plugins
3.4.4.5 Caricare File Vendor
3.4.4.5.1 Esempi coi Vendor
3.4.5 Configurazione del sistema di Routing
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 Singolari e Plurali, regole personalizzate per la declinazione.
3.4.7 Operazioni preliminari in CakePHP
3.5 Controllers
3.5.1 Introduzione
3.5.2 The App Controller
3.5.3 The Pages Controller
3.5.4 Attributi della classe Controller
3.5.4.1 $name
3.5.4.2 $components, $helpers e $uses
3.5.4.3 Attributi della pagina: $layout e $pageTitle
3.5.4.4 L'attributo Parametri ($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 Metodi del Controller
3.5.5.1 Interagire con le Views
3.5.5.1.1 set
3.5.5.1.2 render
3.5.5.2 Controllo di Flusso
3.5.5.2.1 redirect
3.5.5.2.2 flash
3.5.5.3 Callbacks
3.5.5.4 Altri Metodi Utili
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 Componenti
3.6.1 Introduzione
3.6.2 Configurare Componenti
3.6.3 Component callbacks
3.6.4 Creare Componenti personalizzati
3.6.4.1 Including Components in your Controllers
3.6.4.2 MVC Class Access Within Components
3.6.4.3 Using other Components in your Component
3.7 Modelli
3.7.1 Introduzione
3.7.2 Campi "magici"
3.7.2.1 Associazioni dei Tipi di dato per 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 & modified (o updated)
3.7.2.4 Uso delle chiave primarie come UUID
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 Deleting Data
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 Attributi dei modelli
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 (Comportamenti)
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 Views
3.10.1 View Templates
3.10.2 Layouts
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 Metodi delle viste
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 Creare Helpers
3.11.2.1 Including other Helpers
3.11.2.2 Callback method
3.11.2.3 Using your Helper
3.11.3 Creare Funzionalità per tutti gli 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 Attività comuni con CakePHP
4.1 Validazione dei dati
4.1.1 Regole Semplici
4.1.2 Una regola per campo
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 Più regole per campo
4.1.4 Regole di Validazione Predefinite
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 Regole di Validazione Personalizzate
4.1.5.1 Validazione con Espressioni Regolari Personalizzate
4.1.5.2 Metodi di Validazione Personalizzati
4.1.6 Validare i dati sul Controller
4.2 Data Sanitization
4.2.1 paranoid
4.2.2 html
4.2.3 escape
4.2.4 clean
4.3 Gestione degli errori
4.4 Debugging
4.4.1 Debugging basilare
4.4.2 Using the Debugger Class
4.4.3 Debugger Class
4.5 Caching
4.6 Logging
4.6.1 Utilizzo della funzione log
4.7 Testing
4.7.1 Preparing for testing
4.7.1.1 Installing 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 Testing models
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 Paginazione
4.9.1 Controller Setup
4.9.2 Pagination in Views
4.9.3 Paginazione AJAX
4.9.3.1 Modifiche a Layout
4.9.3.2 Modifiche al View
4.9.4 Custom Query Pagination
4.10 REST
4.10.1 The Simple Setup
4.10.2 Custom REST Routing
5 Componenti Core
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 Autenticazione
5.2.1 Configurare le Variabili di Auth Component
5.2.2 Mostrare i messaggi di errore di Auth
5.2.3 Soluzioni ad alcuni problemi di Auth
5.2.4 Modificare il tipo di criptazione
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 AuthComponent Variables
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 Class Attributes and Variables
5.4.1.1 Sending Multiple Emails in a loop
5.4.2 Sending a basic message
5.4.2.1 Setting up the Layouts
5.4.2.2 Setup an email element for the message body
5.4.2.3 Controller
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 Core Behaviors
6.1 ACL
6.1.1 Using the AclBehavior
6.1.2 node()
6.2 Containable
6.3 Translate
6.3.1 Initializing the i18n Database Tables
6.3.2 Attaching the Translate Behavior to your Models
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 Methods
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 Librerie utili in cakePHP
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 Generating and using Schema files
9.2.2 Migrations with CakePHP schema shell
9.3 Modify default HTML produced by "baked" templates
10 Applicazioni di Esempio
10.1 Blog
10.1.1 Ottenere Cake
10.1.2 Creare il Database per il Blog
10.1.3 Configurazione del Database per Cake
10.1.4 Configurazioni Opzionali
10.1.5 Una nota su mod_rewrite
10.1.6 Creare un Modello per i Post
10.1.7 Creare un Controller per i Post
10.1.8 Creare le Views per i Post
10.1.9 Adding Posts
10.1.10 Data Validation
10.1.11 Deleting Posts
10.1.12 Editing Posts
10.1.13 Routes
10.1.14 Conclusion
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 Logout
10.2.10 All done
11 Appendici
11.1 Migrating from CakePHP 1.1 to 1.2
11.1.1 Configure
11.1.2 HTML Helper to Form Helper
11.1.3 Loading Files
11.1.4 Model::generateList()
11.1.5 Possible Migration Approach
3.4 Configurazione
Edit
Comments (0)
History
This text may be out of sync with the English version
« Azione!
|
Configurazione del Database »