Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
21Activity

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
Super Awesome Advanced CakePHP Tips

Super Awesome Advanced CakePHP Tips

Ratings: (0)|Views: 2,779 |Likes:
Published by isol123

More info:

Published by: isol123 on Jul 03, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

11/08/2012

pdf

text

original

 
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

Activity (21)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Manish Pithwa liked this
Kamalesh Dhayal liked this
ricardo_php liked this
Ravindra Thakur liked this
quark555 liked this
Amir Rustamzadeh liked this
loback liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->