2014/06/13

CakePHP 考え方

一言でMVCね。

細かいところは:

★Model:
・The Model class is the bread and butter of CakePHP applications、
By creating a CakePHP model that will interact with our database。

・Naming conventions are very important in CakePHP. By naming our model Post, CakePHP can automatically
infer that this model will be used in the PostsController, and will be tied to a database table called
posts.

・They generallyrepresent a database table but can be used to access anything that manipulates data such as files, external
web services, or iCal events.

・what features of the model can be automated, how to override those features, and
what methods and properties a model can have??




・echo $this->Html->Link('Add Post',array('action' => 'add')));


===>おぼえば非常に簡単∧楽です。

・★relationShip

The four association types in CakePHP are: hasOne, hasMany, belongsTo, and hasAndBelongsToMany
(HABTM).