• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Cakephp2study tips集
 

Cakephp2study tips集

on

  • 2,096 views

2011年10月6日(木)CakePHP2.0勉強会LTの資料

2011年10月6日(木)CakePHP2.0勉強会LTの資料

Statistics

Views

Total Views
2,096
Views on SlideShare
2,077
Embed Views
19

Actions

Likes
1
Downloads
0
Comments
0

3 Embeds 19

http://paper.li 8
http://dev.monsat.tipshare.info 8
http://a0.twimg.com 3

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Cakephp2study tips集 Cakephp2study tips集 Presentation Transcript

  • CakePHP1.3 CakePHP2.0(beta-)
  • require CAKE . Config . DS . routes.php;// Router::connect(/:controller, array(action => index));// Router::connect(/:controller/:action/*);
  • public $validate = array( title => array( between => array( rule => array(between, 10, 100), message => The title must havebetween %d to %d characters, ), ),);
  • $this->request ->data(Post.title, New post) ->data(Comment.1.author, Mark);
  • CakePlugin::loadAll();Configure::load(Site); // load ./Site.php Configure::config(default, ...);
  • # AnyController.phpvar $paginate = array( paramType => querystring);
  • # AnyController.php (default=100)var $paginate = array(maxLimit => 10);
  • # view.ctp<!--nocache--> <?php echo CakeSession::read(‘Auth.user.username’) ?><!--/nocache-->
  • CakeSession::check(‘Auth.user’);$this->Session->setFlash(); // Controller$this->Session->flash(); // View
  • $this->_View->viewVars[foo] === ‘tipshare’$this->_View-> set(title_for_layout, ‘tipshare’);mb_convert_encoding( $this->_View->output, ‘SJIS’, ‘UTF-8’);
  • $this->Form->postLink( ‘delete’, array(‘action’ => ‘delete’));$this->Form->postButton( ‘like’, array(‘action’ => ‘like’));