<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1894317356966509116</id><updated>2012-01-25T04:15:25.826-08:00</updated><category term='cakephp'/><category term='controller'/><category term='why'/><category term='to'/><category term='Install'/><category term='How'/><category term='php'/><category term='learn'/><category term='help'/><title type='text'>CakePHP Helper : Abhinav Varshney, AbhinavZone, cakephp help, tutorial, sample code, free code</title><subtitle type='html'>AbhinavZone cakephp 1.2 manual and cakephp 1.2 API fun and knowledge</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cakephp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cakephp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>cakephp</name><uri>http://www.blogger.com/profile/12389932782448448040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1894317356966509116.post-3037278409646548717</id><published>2007-07-18T22:18:00.000-07:00</published><updated>2007-07-18T22:22:28.838-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cakephp'/><category scheme='http://www.blogger.com/atom/ns#' term='controller'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>CakePHP Controller</title><content type='html'>Now let's move further. the next part is controller. Controller has logics (some times reffered Business logic in Java). In controller you can write any logical code, such as DB queries, calculations and every thing which you can do in PHP. But remember to use cake functions to 'Make Life Simpler'. The controller should be in app/controllers directory.&lt;br /&gt;&lt;br /&gt;You should name controller carefully. The name of controller should be ****_controller.php (replace ****) with your controller name. You should take care about controller name because when you run any page (code) of controller you have to type &lt;a href="http://server.com/(Controller)/(Page/Function"&gt;http://server.com/(Controller)/(Page/Function&lt;/a&gt; Name).&lt;br /&gt;&lt;br /&gt;Controller class extends AppController. If you want to add some global functions for all controllers, you can write them in cake/app_controller.php. Now lets create our first controller&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class UserController extends AppController {&lt;br /&gt;&lt;br /&gt;var $name = 'Users'; //Name of controller&lt;br /&gt;#var $layout = 'upload'; //Default Layout for this model&lt;br /&gt;//in case you want to use different layout (I will cover Layouts in next posts)&lt;br /&gt;#var $uses = array('User'); //If you want to use more then one table (Model) then add in uses array.&lt;br /&gt;#var $components = array('Email'); //Components to be used in this controller (I will cover components in next posts)&lt;br /&gt;function index() // Default function, when called show index page. { }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1894317356966509116-3037278409646548717?l=cakephp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cakephp.blogspot.com/feeds/3037278409646548717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1894317356966509116&amp;postID=3037278409646548717' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default/3037278409646548717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default/3037278409646548717'/><link rel='alternate' type='text/html' href='http://cakephp.blogspot.com/2007/07/cakephp-controller.html' title='CakePHP Controller'/><author><name>cakephp</name><uri>http://www.blogger.com/profile/12389932782448448040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1894317356966509116.post-5106712199924912549</id><published>2007-07-18T22:16:00.000-07:00</published><updated>2007-07-18T22:18:38.935-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cakephp'/><category scheme='http://www.blogger.com/atom/ns#' term='Install'/><category scheme='http://www.blogger.com/atom/ns#' term='to'/><category scheme='http://www.blogger.com/atom/ns#' term='How'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>How to Install cakePHP (Cake PHP)</title><content type='html'>I got some comments about installing cakephp. please follow this link to get full guide. If you have any trouble then post here.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://manual.cakephp.org/chapter/installing"&gt;http://manual.cakephp.org/chapter/installing&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1894317356966509116-5106712199924912549?l=cakephp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cakephp.blogspot.com/feeds/5106712199924912549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1894317356966509116&amp;postID=5106712199924912549' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default/5106712199924912549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default/5106712199924912549'/><link rel='alternate' type='text/html' href='http://cakephp.blogspot.com/2007/07/how-to-install-cakephp-cake-php.html' title='How to Install cakePHP (Cake PHP)'/><author><name>cakephp</name><uri>http://www.blogger.com/profile/12389932782448448040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1894317356966509116.post-3282129133378914265</id><published>2007-06-08T23:37:00.000-07:00</published><updated>2007-06-08T23:42:52.082-07:00</updated><title type='text'>CakePHP: Model</title><content type='html'>o hi..I was too busy form past few days.. didn't had tm 2 update it so lets start..&lt;br /&gt;BAsically cake php is a php framework, based on MVC (Model - View - Controller)architecture. Model belongs to data. it directly associated with DB. We can definecertain DB properties, primary keys, table relationships in to model. so overall model can be think as a Database Proxy.hmm I know what question is in your mind.. Why I need Model?? hmm rite?.. ok let me explainBAsically model is abstract view of database. all the complex operation on databbase cas bedone with ease by using model functions. suppose you hav 40 columns in your DB, for inserting data you need to write a long query (near abt 1000 words), but using model  just use Model::save() function.. Cool..!! no.....&lt;br /&gt;&lt;br /&gt; need more ok..Now another cool feature is data validation. suppose you want that password must be 6-15 digit longand username must not be blank. In traditional design you need to write a long code which may take 15 minuts.But here just define it in model in few seconds and u r done!! .. A lots of more features are there.. I will tell you in next posts.&lt;br /&gt;&lt;br /&gt; Now lets create a simple model, User&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#003300;"&gt;&lt;?php&lt;br /&gt;/** * Constructing model for the application. This model maps 'addresses' * table in database. It receives command from controller and applies * it to database */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#003300;"&gt;class User extends AppModel {&lt;br /&gt;  var $name = 'User'; // Name of Model, We will use this name in our controller and view to refer 'tbl_user' table.  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#003300;"&gt;var $useTable = 'tbl_user'; // Name of table  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#003300;"&gt;var $primaryKey = 'user_id'; // Primary key     &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#003300;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#003300;"&gt;// Validation criteria   &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#003300;"&gt;var $validate = array(      'username' =&gt; array('rule' =&gt; array('between', 6, 15), 'message' =&gt; 'Username must 6 - 15 character long.'),     'password' =&gt; array('rule' =&gt; array('between', 6, 15), 'message' =&gt; 'Password must 6 - 15 character long.'),  'email' =&gt; array('rule' =&gt; array('email'), 'message' =&gt; 'Please enter valid email'),  'first_name' =&gt; array('rule' =&gt; array('between', 1, 1000), 'message' =&gt; 'Please enter first name.'),  'last_name' =&gt; array('rule' =&gt; array('between', 1, 1000), 'message' =&gt; 'Please enter last name.'),  'address_line_1' =&gt; array('rule' =&gt; array('between', 1, 1000), 'message' =&gt; 'Please enter address'),  'city' =&gt; array('rule' =&gt; array('between', 1, 1000), 'message' =&gt; 'Please enter city.'),  'country' =&gt; array('rule' =&gt; array('between', 1, 1000), 'message' =&gt; 'Please select country'),  'day_phone' =&gt; array('rule' =&gt; array('between', 1, 20), 'message' =&gt; 'Please enter valid phone number.'),  'zip' =&gt; array('rule' =&gt; array('between', 1, 7), 'message' =&gt; 'Please enter valid zip code.')  );  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#003300;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#003300;"&gt;}&lt;br /&gt; &lt;/span&gt;&lt;br /&gt;?&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1894317356966509116-3282129133378914265?l=cakephp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cakephp.blogspot.com/feeds/3282129133378914265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1894317356966509116&amp;postID=3282129133378914265' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default/3282129133378914265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default/3282129133378914265'/><link rel='alternate' type='text/html' href='http://cakephp.blogspot.com/2007/06/cakephp-model.html' title='CakePHP: Model'/><author><name>cakephp</name><uri>http://www.blogger.com/profile/12389932782448448040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1894317356966509116.post-1148608497602859694</id><published>2007-05-27T23:07:00.000-07:00</published><updated>2007-05-27T23:11:41.266-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cakephp'/><category scheme='http://www.blogger.com/atom/ns#' term='learn'/><title type='text'>My first cake bite - 1</title><content type='html'>Hi&lt;br /&gt;&lt;br /&gt;In my organisation I got a project on cakephp. I nevre hrd abt any framework in php. This is my first php project in which I am using framework. I hav good experience in struts so I am expecting that it will not much hard to understand 4 me.&lt;br /&gt;&lt;br /&gt;I have decided to write my daily progress here so that it can help those ppl who r new to this framework.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1894317356966509116-1148608497602859694?l=cakephp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cakephp.blogspot.com/feeds/1148608497602859694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1894317356966509116&amp;postID=1148608497602859694' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default/1148608497602859694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default/1148608497602859694'/><link rel='alternate' type='text/html' href='http://cakephp.blogspot.com/2007/05/my-first-cake-bite-1.html' title='My first cake bite - 1'/><author><name>cakephp</name><uri>http://www.blogger.com/profile/12389932782448448040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1894317356966509116.post-3520137334166728766</id><published>2007-05-17T23:11:00.000-07:00</published><updated>2007-05-17T23:13:45.087-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cakephp'/><category scheme='http://www.blogger.com/atom/ns#' term='help'/><category scheme='http://www.blogger.com/atom/ns#' term='why'/><title type='text'></title><content type='html'>&lt;span style="color:#ff0000;"&gt;Why CakePHP?&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;It has many features that makes it a great framework for developing applications swiftly and with the least amount of hassle. Here are a few in no particular order:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Active, friendly community&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Flexible Licensing&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Compatibility with PHP4 and PHP5&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Integrated CRUD for database interaction and simplified queries&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Application Scaffolding&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Model View Controller (MVC) Architecture&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Request dispatcher with good looking, custom URLs&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Built-in Validation&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Fast and flexible templating (PHP syntax, with helpers)&lt;/span&gt;&lt;/li&gt;&lt;span style="font-size:85%;"&gt;&lt;li&gt;View Helpers for AJAX, Javascript, HTML Forms and more Security, Session, and Request Handling Components&lt;/li&gt;&lt;li&gt;Flexible access control lists&lt;/li&gt;&lt;li&gt;Data Sanitization&lt;/li&gt;&lt;li&gt;Flexible View Caching&lt;/li&gt;&lt;li&gt;Works from any web site subdirectory, with little to no Apache configuration involved&lt;br /&gt; &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1894317356966509116-3520137334166728766?l=cakephp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cakephp.blogspot.com/feeds/3520137334166728766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1894317356966509116&amp;postID=3520137334166728766' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default/3520137334166728766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default/3520137334166728766'/><link rel='alternate' type='text/html' href='http://cakephp.blogspot.com/2007/05/why-cakephp-it-has-many-features-that.html' title=''/><author><name>cakephp</name><uri>http://www.blogger.com/profile/12389932782448448040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1894317356966509116.post-5343250854880241587</id><published>2007-05-17T22:39:00.000-07:00</published><updated>2007-05-17T22:42:57.764-07:00</updated><title type='text'>Introduction to CakePHP</title><content type='html'>&lt;span style="font-size:130%;color:#ff0000;"&gt;&lt;strong&gt;What is CakePHP?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;CakePHP is a free and open-source rapid development framework for PHP.It composit of a structure of libraries, classes &amp;amp; run-time infrastructure for web application programmers creating web applications originally inspired by the Ruby on Rails framework. Yes!! Its true... Now you can take advantage of Ruby on Rails in PHP too. The coading style in cake PHP is verymuch similer to Ruby on Rails. The Goal of this blog is to enable you to work in a structured and rapid manner - without loss of flexibility.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1894317356966509116-5343250854880241587?l=cakephp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cakephp.blogspot.com/feeds/5343250854880241587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1894317356966509116&amp;postID=5343250854880241587' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default/5343250854880241587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1894317356966509116/posts/default/5343250854880241587'/><link rel='alternate' type='text/html' href='http://cakephp.blogspot.com/2007/05/introduction-to-cakephp.html' title='Introduction to CakePHP'/><author><name>cakephp</name><uri>http://www.blogger.com/profile/12389932782448448040</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry></feed>
