Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
CakePHP 2 Application Cookbook

You're reading from  CakePHP 2 Application Cookbook

Product type Book
Published in Aug 2014
Publisher
ISBN-13 9781782160083
Pages 346 pages
Edition 1st Edition
Languages
Toc

Table of Contents (20) Chapters close

CakePHP 2 Application Cookbook
Credits
Foreword
About the Authors
About the Reviewer
www.PacktPub.com
Preface
1. Lightning Introduction 2. Advanced Routing 3. HTTP Negotiation 4. API Strategies 5. Using Authentication 6. Model Layer 7. Search and Pagination 8. Events System 9. Creating Shells 10. View Templates 11. Unit Tests 12. Migrations Index

Index

A

  • Access
    • about / How it works...
  • Access Control Objects (ACO)
    • about / How it works...
  • Access Request Objects (ARO)
    • about / How it works...
  • ACL
    • working with / Working with ACL, Getting ready, How to do it..., How it works...
  • AclExtras plugin
    • URL / Getting ready
  • aco_sync task
    • about / How it works...
  • Actions authenticate class
    • about / How it works...
  • add() action
    • about / How it works...
  • add() method
    • about / How it works...
  • addInputType() method / How it works...
  • advanced search
    • about / Advanced search, Getting ready, How to do it..., How it works...
  • afterDisptach() method
    • about / How it works...
  • afterSave() callback
    • about / Getting ready, Getting ready
  • afterSave() method / How to do it...
    • about / Getting ready
  • Ajax requests
    • processing / Processing Ajax requests, How to do it..., How it works...
  • allow() method
    • about / How it works...
  • API
    • versioning / API versioning, How to do it..., How it works..., There's more...
  • App$$uses()
    • about / How it works...
  • ARO tree
    • about / How it works...
  • AssetCompress plugin
    • setting up / The AssetCompress plugin, How to do it..., How it works...
    • URL / Getting ready
  • association keys
    • using, URL / How it works...
  • associations
    • defining, at runtime / On-the-fly associations, How to do it..., How it works...
  • Auth component
    • URL / See also
  • AuthComponent$$user() method
    • about / How it works...
  • authentication API
    • setting up / Authentication API, How to do it..., How it works...
  • authentication classes
    • FormAuthenticate / The HTTP authentication
    • BasicAuthenticate / The HTTP authentication
    • DigestAuthenticate / The HTTP authentication
  • authorize() method
    • about / How it works..., How it works...

B

  • bake shell
    • URL / Getting ready
    • about / How it works...
  • BasicAuthenticate, authentication classes / The HTTP authentication
  • beforeDisptach() method
    • about / How it works...
  • beforeFilter() callback method
    • about / How it works..., How it works..., How it works..., How it works...
  • beforeFilter() method
    • about / How it works...
    / How it works...
  • beforeSave() callback
    • about / How it works...
  • beforeSave() callback method
    • about / How it works...
  • beforeSave() method
    • about / How it works...
  • bindModel() method
    • about / How it works...
  • block option
    • about / How it works...
  • blocks
    • using / Using blocks, Getting ready, How it works...
  • body() method
    • about / How it works...
  • build command
    • about / How it works...

C

  • $components property
    • about / See also
  • --connection option
    • about / How it works...
  • Cache$$remember()
    • about / How it works...
  • cacheConfig option
    • about / How it works...
  • cachePath option
    • about / How it works...
  • caching
    • URL / See also
  • CakeDC Search plugin
    • about / The Search plugin, How to do it..., How it works...
    • URL / See also, See also
  • CakeDC Users plugin
    • URL / How it works...
  • CakeEmail$$deliver() method / How it works...
  • CakeEmail class
    • URL / See also
  • CakePdf
    • URL / Getting ready
  • CakePdf plugin
    • about / Writing some PDF content to a file
  • CakePHP associations
    • URL / Has and belongs to many (HABTM)
  • CakePHP File Storage plugin
    • about / There's more…
    • URL / There's more…
  • CakePHP Imagine plugin
    • about / There's more…
    • URL / There's more…
  • CakePHP model
    • model unit testing, building for / Model unit testing, How to do it…, How it works…
  • CakePHP Upload plugin
    • about / There's more…
    • URL / There's more…
  • CakeRequest$$is() method
    • about / How it works...
  • CakeRequest**$params array
    • about / How it works...
  • CakeResponse$$type() method
    • about / How it works...
  • CakeResponse class
    • about / How it works...
  • CakeResque$$enqueue() method / How it works...
  • CakeResque plugin
    • used, for creating job queue / Event stacking, Getting ready, How to do it..., How it works...
  • calculate() method / How it works...
  • callback detector / Using a detector
  • callback methods
    • URL / See also
  • change() method
    • about / How it works...
  • changes, schema file
    • applying / Syncing changes, How to do it...
  • check() method
    • about / How it works...
  • checkNotModified() method
    • about / How it works...
  • ClassRegistry$$init() method
    • about / How it works..., There's more...
  • ClassRegistry utility class
    • about / How it works...
  • clear() method
    • about / How it works...
  • commonProcess() method
    • about / How it works...
  • compact() function
    • about / How it works..., How it works...
  • components, CakePHP
    • URL / See also
  • Composer
    • using / Getting ready
  • conditions option / How it works...
  • console API
    • creating / Console API, How to do it..., How it works...
    • URL / See also
  • containable
    • about / Containing models
  • containable behavior
    • used, for configuring models / Containing models, Getting ready, How to do it..., How it works...
  • content block
    • about / How it works...
  • controller
    • about / How it works...
  • conventions, CakePHP
    • URL / See also
  • cookie() method
    • about / How it works...
  • cookies
    • working with / Working with cookies, How to do it..., How it works...
    • configuration options / How it works...
  • cookies, configuration options
    • name / How it works...
    • time / How it works...
    • path / How it works...
    • domain / How it works...
    • secure / How it works...
    • key / How it works...
    • httpOnly / How it works...
  • cookie_remove() action
    • about / How it works...
  • count() function
    • about / How it works
  • counter() method
    • about / How it works..., How it works...
  • create() method
    • about / How it works..., How it works..., How it works..., How it works...
  • cron shells
    • implementing / Running cron shells, How to do it..., How it works...
  • CRUD (create/read/update/delete)
    • about / Introduction
  • custom authorize class
    • about / Custom authorize class, Getting ready, How to do it..., How it works...
  • custom finder
    • creating / Custom finders, How to do it..., How it works...
  • custom RBAC
    • about / Custom RBAC, How to do it..., How it works...
  • custom route class
    • creating / Custom route class, Getting ready, How to do it..., How it works..., There's more...

D

  • dashboard() action / How it works...
  • data
    • reading, URL / See also
    • saving, URL / See also
    • deleting, URL / See also
    • inserting, in database / Injecting data, Getting ready, How to do it..., How it works...
  • database
    • data, inserting / Injecting data, Getting ready, How to do it..., How it works...
  • data validation, CakePHP
    • URL / See also
  • delegate() method / How it works..., How it works...
  • delete() method
    • about / How it works..., How it works...
  • deny() method
    • about / How it works...
  • Dependency injection
    • about / Dependency Injection, Getting ready, How it works...
    • constructor / Dependency Injection
    • method / Dependency Injection
    • field / Dependency Injection
  • detector
    • using / Using a detector, Getting ready, How to do it...
  • detector types
    • Environment Value Comparison detector / Using a detector
    • Pattern Value Comparison detector / Using a detector
    • Options-based Comparison detector / Using a detector
    • callback detector / Using a detector
  • DigestAuthenticate, authentication classes / The HTTP authentication
  • disableCache() method
    • about / How it works...
  • dispatch($event) method
    • about / How it works...
  • dispatch filter
    • creating / Dispatch filter, Getting ready, How to do it..., How it works..., There's more…
  • download() method
    • about / How it works...

E

  • --exclude-plugins option / How it works...
  • --extract-core no option / How it works...
  • edit() method
    • about / How it works...
  • element() method
    • about / How it works...
  • end() method
    • about / How it works...
  • Environment Value Comparison detector / Using a detector
  • error handling
    • about / Error handling, How to do it..., How it works...
    • URL / See also
  • error key
    • about / How it works...
  • Etag
    • about / How it works...
  • event-driven process
    • using / Event-driven process, Getting ready, How to do it..., How it works...
  • event priorities
    • managing / Managing event priorities, Getting ready, How to do it..., How it works...
  • event stacking
    • about / Event stacking
  • event system
    • URL / See also
  • exceptions, CakePHP
    • URL / See also
  • expires() method
    • about / How it works...
  • extensions
    • parsing / Parsing extensions, How to do it..., How it works...

F

  • $findMethods property
    • about / How it works...
  • --force option
    • about / How it works...
  • -f parameter
    • about / How it works...
  • Facebook API
    • URL / See also
  • Facebook app
    • URL / Getting ready
  • Facebook authentication
    • about / Facebook authentication, Getting ready, How to do it..., How it works...
  • fields key
    • about / How it works...
  • file
    • uploading / Uploading a file, Getting ready, How to do it..., How it works..., There's more…
    • PDF content, writing to / Writing some PDF content to a file
  • file() method
    • about / How it works...
  • file-locking
    • URL / See also
  • files
    • downloading / Getting ready
  • filter option
    • about / Basic search and filter, How to do it..., How it works…
  • find() method
    • about / How it works..., How it works..., How it works..., How it works
  • findById() method
    • about / How it works..., How it works...
  • fixture
    • creating / Creating a fixture, Getting ready, How to do it..., How it works...
  • flash() method
    • about / How it works...
  • FormAuthenticate, authentication classes / The HTTP authentication
  • form helper, CakePHP
    • URL / See also

G

  • generateModel() method
    • about / How it works...
  • getMockBuilder() method
    • about / How to do it...
  • getMockBuilder(*Blog*) method
    • about / How it works...
  • getOptionParser() method / How it works..., How it works...
  • Git clone
    • using / Getting ready

H

  • $hasMany property
    • about / How to do it...
  • HABTM
    • about / Has and belongs to many (HABTM)
  • HABTM association
    • about / Has and belongs to many (HABTM), Getting ready, How to do it..., How it works...
    • URL / Has and belongs to many (HABTM)
  • Hash$$extract() method
    • about / How it works...
  • Hash$$get() function
    • about / How it works...
  • hash() method
    • about / How it works...
  • Hash class usage
    • examples, URL / See also
  • header() method
    • about / How it works...
  • helpers, CakePHP
    • URL / See also
  • heredoc syntax
    • URL / See also
  • Html helper, CakePHP
    • URL / See also
  • HTTP authentication
    • about / The HTTP authentication, How to do it..., How it works...
    • URL / How it works...
  • HTTP cache
    • handling / Cache control, How it works...
  • HTTP header
    • about / How it works...
  • HTTP socket class
    • URL / See also
  • hyper-text transfer protocol
    • URL / See also

I

  • I18n shell
    • using / Using the I18n shell, Getting ready, How to do it..., How it works...
  • implementedEvents() method / Listeners and subscribers, How it works...
  • includeCss() method
    • about / How it works...
  • includeJs() method
    • about / How it works...
  • index() action
    • about / How it works...
  • index() method
    • about / How it works...
    / How it works..., How it works
  • init() method / How it works...
  • inputs() method
    • about / How it works...
  • internationalization, CakePHP
    • URL / See also
  • inventory_update() action
    • about / How it works...
  • is_rating_modified field / How it works...
  • is_uploaded_file() function
    • about / How it works...

J

  • JavaScript Object Notation
    • URL / See also
  • job queue
    • creating, CakeResque plugin used / Event stacking, Getting ready, How to do it..., How it works...
  • join through association type
    • using / Joining through, How it works...
  • Jsend spec
    • URL / See also
  • json_decode() function / How it works...
  • json_encode() function
    • about / How it works...

K

  • * key
    • about / How it works...

L

  • $layout property
    • about / How to do it...
  • language() method / How it works...
  • languages
    • handling / Handling languages, How to do it..., How it works...
  • Last-Modified header
    • about / How it works...
  • last_modified() method
    • about / How it works...
  • latest() method
    • about / How it works...
  • link() method
    • about / How it works..., How it works..., How it works...
  • listeners
    • about / Listeners and subscribers, Getting ready, How to do it..., How it works...
  • listing() action
    • about / How it works...
  • load() method / How it works...
  • login
    • adding / Adding a login, How to do it..., How it works...
  • login() method
    • about / How it works...
  • logout() method
    • about / How it works..., How it works...

M

  • --merge no option / How it works...
  • mapResources() method / How it works...
  • matcher functions, PHPUnit
    • URL / See also
  • md5() function
    • about / How it works...
  • Migrations plugin
    • installing / The Migrations plugin, How to do it..., How it works...
  • mock objects
    • configuring / Mock objects, Getting ready, How it works...
  • models
    • configuring, containable behavior used / Containing models, Getting ready, How to do it..., How it works...
  • model unit testing
    • building, for CakePHP model / Model unit testing, How to do it…, How it works…
  • modified() action
    • about / How it works...
  • move_uploaded_file() function
    • about / How it works...

N

  • nestedList() method
    • about / How it works..., How it works
  • next() method
    • about / How it works..., How it works...
  • numbers() method
    • about / How it works...

O

  • --output argument
    • about / How it works...
  • OAuth 2.0 specification
    • URL / See also
  • OAuth protocol
    • URL / See also
  • object relational mapper (ORM)
    • about / How it works...
  • observer pattern
    • URL / Listeners and subscribers
  • on setting
    • about / There's more…
  • Opauth
    • URL / See also
  • Opauth installation, CakePHP
    • URL / See also
  • Opauth strategies
    • URL / See also
  • Options-based Comparison detector / Using a detector
  • out() method / How it works...
  • output() method
    • about / Writing some PDF content to a file

P

  • $path variable
    • about / How it works...
  • $priority property
    • about / There's more…
  • $product variable
    • about / How it works...
  • paginate() method
    • about / How it works..., How it works...
  • pagination
    • about / How it works..., Pagination, How to do it..., How it works...
    • URL / How it works...
  • pagination options
    • URL / See also
  • Paginator component
    • about / How it works...
  • Paginator helper
    • about / How it works...
  • paramType setting
    • about / How it works...
  • parent$$match() method
    • about / There's more...
  • parent$$parse()
    • about / How it works...
  • parentNode() method
    • about / How it works...
  • parse() method / How it works...
  • parseCriteria() method
    • about / How it works...
  • parseExtensions() method
    • about / How it works...
    / How it works...
  • parser
    • importing / Import parser, How to do it..., How it works...
  • parseResponse() method / How it works...
  • Pattern Value Comparison detector / Using a detector
  • PDF content
    • writing, to file / Writing some PDF content to a file
  • PDF document
    • generating / Generating a PDF, Getting ready, How to do it..., How it works...
  • perform() method / How it works...
  • permissions.php file
    • about / How it works...
  • PHP constants
    • UPLOAD_ERR_INI_SIZE / How it works...
    • UPLOAD_ERR_FORM_SIZE / How it works...
    • UPLOAD_ERR_PARTIAL / How it works...
    • UPLOAD_ERR_NO_FILE / How it works...
    • UPLOAD_ERR_NO_TMP_DIR / How it works...
    • UPLOAD_ERR_CANT_WRITE / How it works...
    • UPLOAD_ERR_EXTENSION / How it works...
  • PHPUnit installation
    • URL / Getting ready
  • plugin
    • using / Including a plugin, How to do it..., How it works...
    • Git clone, using / Getting ready
    • Composer, using / Getting ready
    • files, downloading / Getting ready
  • plugins
    • CakePHP Upload plugin / There's more…
    • CakePHP File Storage plugin / There's more…
    • CakePHP Imagine plugin / There's more…
  • plugins, CakePHP
    • URL / See also
  • Poedit tool
    • URL / See also
  • Post/Redirect/Get design pattern
    • URL / See also
  • postLink() method
    • about / How it works...
  • prefix
    • adding / Adding a prefix, Getting ready, How to do it..., How it works...
  • prefix option / How it works...
  • prev() method
    • about / How it works..., How it works...
  • PRG design pattern
    • URL / See also, See also
  • processPdfJob parameter / How it works...
  • ProductsController class
    • about / How it works...

R

  • $recursive property
    • about / How it works..., How it works...
  • $responseClass property / How it works...
  • rapid application development (RAD)
    • about / Introduction
  • RBAC definition
    • URL / See also, See also
  • realm parameter
    • about / How it works...
  • records
    • listing / Listing and viewing records, Getting ready, How to do it..., How it works...
    • viewing / Listing and viewing records, Getting ready, How to do it..., How it works...
    • adding / Adding and editing records, How to do it..., How it works...
    • editing / Adding and editing records, How to do it..., How it works...
    • deleting / Deleting records, How it works...
  • redirect() method
    • about / How it works...
  • Redis documentation
    • URL / Getting ready, How it works...
  • register() method
    • about / How it works...
  • request handling
    • URL / See also
  • resourceMap() method / How it works...
  • respond() action
    • about / How it works...
  • response
    • building / Building a response, How it works...
  • REST
    • URL / See also
  • RESTful resources
    • about / RESTful resources, Getting ready, How to do it..., How it works...
  • Role Based Access Control (RBAC)
    • about / Custom RBAC
  • role field
    • about / How it works...
  • routeClass
    • about / How it works...
  • Router$$connect() method / How it works...
  • routing prefixes
    • URL / See also, How it works...
  • routing solutions
    • prefix, adding / Adding a prefix, Getting ready, How to do it..., How it works...
    • languages, handling / Handling languages, How to do it..., How it works...
    • custom route class, creating / Custom route class, Getting ready, How to do it..., How it works..., There's more...
    • dispatch filter, creating / Dispatch filter, Getting ready, How to do it..., How it works..., There's more…

S

  • $searchQuery parameter
    • about / How it works…
  • $settings property
    • about / How it works...
  • save() method
    • about / How it works...
  • saveAll() method
    • about / Using transactions
  • saveAssociated() method
    • about / Using transactions
  • saveMany() method
    • about / Using transactions, How it works...
  • saveTestUser() method
    • about / How it works...
  • schema
    • handling / Schema handling, Getting ready, How to do it..., How it works...
  • schemas and migrations
    • URL / See also
  • scope key
    • about / How it works...
  • script() method
    • about / How it works...
  • scriptBlock() method
    • about / How it works...
  • SearchableBehavior
    • about / How it works...
  • search option
    • about / Basic search and filter, How to do it..., How it works…
  • sendEmailAlert() method / How to do it...
  • sequential ID
    • versus UUID / How it works...
  • service
    • consuming / Consuming a service, How to do it..., How it works...
  • session, CakePHP
    • URL / See also
  • Session component
    • about / How it works...
  • set() method
    • about / How it works..., How it works..., How it works..., How it works..., How it works..., How it works..., How it works...
  • setEmail(CakeEmail $email) method
    • about / How it works...
  • setFlash() method
    • about / How it works..., How it works..., How it works..., How it works...
  • setMethods(array(*save*, *find*)) method
    • about / How it works...
  • setUp() method / How it works…
  • sharable() method
    • about / How it works...
  • SimplePasswordHasher class
    • about / How it works...
  • sort() method
    • about / How it works..., How it works...
  • statusCode() method
    • about / How it works...
  • stopPropagation()
    • about / How it works...
  • stopPropagation() method / How it works...
  • stub method
    • configuring / Stub method configuration, How to do it..., How it works...
  • subscribers
    • about / Listeners and subscribers, How to do it..., How it works...
  • switch() statement
    • about / How it works...

T

  • $this->once() matcher function
    • about / How it works...
  • -t default option
    • about / How to do it...
  • tag() method
    • about / How it works...
  • tearDown() method / How it works…
  • template() method
    • about / Writing some PDF content to a file
  • test doubles
    • about / Mock objects
    • URL / See also, See also
  • transactions
    • using / Using transactions, Getting ready, How it works...
  • transactions, MySQL
    • URL / See also
  • translation functions
    • __c() function / How it works
    • __dc() function / How it works
    • __dcn() function / How it works
  • translations
    • handling / Translations, Getting ready, How to do it..., How it works, There's more...
  • type() method
    • about / How it works...

U

  • uniqid() function
    • about / How it works...
  • upload() action
    • about / How it works...
  • UPLOAD_ERR_CANT_WRITE / How it works...
  • UPLOAD_ERR_EXTENSION / How it works...
  • UPLOAD_ERR_FORM_SIZE / How it works...
  • UPLOAD_ERR_INI_SIZE / How it works...
  • UPLOAD_ERR_NO_FILE / How it works...
  • UPLOAD_ERR_NO_TMP_DIR / How it works...
  • UPLOAD_ERR_PARTIAL / How it works...
  • userModel key
    • about / How it works...
  • UUID
    • versus sequential ID / How it works...

V

  • $validate property
    • about / How it works...
  • validate() method
    • about / How it works...
  • View$$extend() method
    • about / How it works...
  • View$$fetch()
    • about / How it works...
  • View$$fetch() method
    • about / How it works...
  • view($id) method
    • about / How it works...
  • view() method / How it works...
  • views
    • caching / View caching, How to do it..., How it works...

W

  • web service
    • exposing / Exposing a web service, How to do it..., How it works...
  • will() method
    • about / Stub method configuration

X

  • XML view
    • building / Building an XML view, How to do it..., How it works...
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}