• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
Super Awesome AdvancedCakePHP Tips
This book is available f or free at http://www.pseudocoder.com/free-cakephp-book Version 1.1
Super Awesome Advanced CakePHP Tips byMatt Curryis licensed under aCreative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.CakePHP is a registered trademark of theCake Software Foundation (http://cakefoundation.org)2
 
Contents
Who Should Read This Book..........................................................................................................................6
How to Read This Book.............................................................................................................................................6
How to Learn CakePHP..................................................................................................................................7
The Paid Way.............................................................................................................................................................7The Free Way.............................................................................................................................................................8After you’ve done Either/Both Of The Above.........................................................................................................8
Models...............................................................................................................................................................9
Recursion....................................................................................................................................................................9Containable Behavior................................................................................................................................................9Why You Should Use It.............................................................................................................................................9This Will Catch Everyone At Least Once..............................................................................................................10
Custom Find Types........................................................................................................................................11
The Unofficial Cake Way........................................................................................................................................11My Way....................................................................................................................................................................12Comparison..............................................................................................................................................................14App Model................................................................................................................................................................15
Getting the Logged In User from Anywhere...............................................................................................16
The User Model .......................................................................................................................................................16In The AppController..............................................................................................................................................17Back to the User Model...........................................................................................................................................17Usage.........................................................................................................................................................................18What About The Configure Class?........................................................................................................................18Full Source...............................................................................................................................................................19
Automatically Tracking Created/Modified By............................................................................................20
Database...................................................................................................................................................................20Model Relations.......................................................................................................................................................20Model beforeValidate Callback..............................................................................................................................20Behavior beforeValidate Callback.........................................................................................................................20The Full Behavior....................................................................................................................................................21
Routing............................................................................................................................................................22
Case Insensitive........................................................................................................................................................22
Unit Testing....................................................................................................................................................23
Views.........................................................................................................................................................................23
3
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...