CakePHP
CakePHP2ã§ãCASEãCONCATãªã©ã使ã£ã¦ãã¼ãã«ã«åå¨ããªããã£ã¼ã«ãåã§ã½ã¼ããè¡ãå ´åãä¾ãã°ä¸è¨ã®ããã«ããã¨æãã¾ãã ['CASE WHEN User.age >= 20 then 1 else 0 END AS adult'], 'order' => ['adult DESC'] ]; find('all', $params); é常ã®fâ¦
CakePHP3ã触ãå§ãã¦ãã¾ããCake3ããfind()ã®çµæããªãã¸ã§ã¯ãã«ãªãã¾ããã Cake2ã¾ã§ã¯é åã ã£ãã®ã§pré¢æ°ã§è¦ã¦ãåé¡ãªãã£ãã®ã§ããããªãã¸ã§ã¯ãã«ãªãã¨prã¯è¾ããªãã¾ããCakePHP3ããã¯debugé¢æ°ã使ãã¨ä¸è¨ã®ããã«ãªã¬ã¼ã·ã§ã³å ã®ãâ¦
CakePHPã¢ããã³ãã«ã¬ã³ãã¼2014ã®2æ¥ç®ã®è¨äºã§ãã12/1ã« @K1LoWãããçªç¶ã¢ããã³ããå§ããã®ã§ä¹ãé ããªãããã«2æ¥ç®ãæ å½ãã¾ããã¾ã ã¢ããã³ãã«ã¬ã³ãã¼ã¯ç©ºãã¦ããã®ã§çæ§ãæ¯éãããããã12/10ã«CakePHP2å®è·µå ¥éãé»åæ¸ç±ã¨ãã¦çºå£²ãâ¦
CakePHP2ããã¯PDOã使ã£ã¦DBã¢ã¯ã»ã¹ããããã«ãªãã¾ãããPDO(mysql)ã§ã¯ãããã©ã«ãè¨å®ã§ãã¼ã¿ãfetchããã¨intåã®ã«ã©ã ã§ãstringåã¨ãã¦çµæãè¿ã£ã¦ãã¾ããCakePHPããã®å½±é¿ãåãã¦ãããjsonãã¼ã¿ãªã©ã«å¤æããéããåãå³å¯ã«æ±ãããâ¦
ããããã¸ã§ã¯ãã§CakePHP1.2ã使ã£ã¦ããã®ã§ããããããããµãã¼ãæéãçµãããããªæ°ãããã®ã§CakePHP2.3ã®ææ°çã«ã¢ãããã¼ããã¾ããã ãµã¤ãã¯æã«æ°ç¾ä¸PVãããã®è¦æ¨¡ã§ãDBãã¼ãã«æ°ã¯80ããããããã«å ãã¦Viewãã¼ãã«ãã¹ãã¢ãããã·â¦
CakePHP1.2, 1.3, 2.xã®Paginatorã³ã³ãã¼ãã³ãã«èå¼±æ§ããããææªã¯SQLã¤ã³ã¸ã§ã¯ã·ã§ã³ãèµ·ããå¯è½æ§ãããã¨ã®ãã¨ã http://bakery.cakephp.org/articles/markstory/2013/04/28/security_release_-_cakephp_1_2_12_1_3_16_2_2_8_and_2_3_4 æ©æ¥ã«ã¢â¦
æ ªå¼ä¼ç¤¾ãããã§éå¬ãããã第ï¼åCakePHPåå¼·ä¼ã§çºè¡¨ãã¦ãã¾ããã ä»åã®ãé¡ã¯ããã¨ã³ã¸ãã¢ã¨ãã¶ã¤ãã¼ã®åæ¥ãã§ããã ãã¶ã¤ãã¼åãã¨ããã®ã¯ãå®ã¯ï¼åç®ããããªã®ã§ä½ã話ããããªã¨æ©ãã§ã¾ãããæ©ãã æ«ã«ãããã°ã©ããã©ãã¾ã§ãã¶ã¤â¦
æ£ç¢ºã«ã¯æ°ã¶æåããã°ã«ã¼ãã¯åºæ¥ã¦ããã ãã©ãéè¯ã£ã½ãæãã ã£ãã ä»ã¯ãCakePHPã³ã¢ãã¼ã ã®äººãåå ãã¦ãããååãCakePHP Japanã¨ããã°ã«ã¼ãåã«ãªããæ£å¼ã£ã½ããªã£ãæããhttps://www.facebook.com/groups/304490963004377/æ¥æ¬ã®ãã©ã¼â¦
CakePHP1.3ããã³ã¢ãããããã¼ã«ãªã£ãMarkStoryããã®ã¤ã³ã¿ãã¥ã¼åç»ãå ¬éããã¦ã¾ããhttp://twit.tv/show/floss-weekly/244åç»ã¯ãã¦ã³ãã¼ãã§ãã¾ãã ã¾ããé³å£°ã®ã¿ã§ããã¦ã³ãã¼ãã§ããã®ã§ããããiPhoneã«å ¥ãã¦è´ãã¦ã¾ãããå½¼ã®äººæãâ¦
Cake1.2ããCake2ã«ä¹ãæããã¦ãã¦ã¯ã¾ã£ã話ã ã¨ã©ã¼ãã°ã«ä¸è¨ã®ãããªã¡ãã»ã¼ã¸ãåºã¦ãã¾ã表示ã§ããªãå ´åãã³ã³ããã¼ã©ã®responseãªãã¸ã§ã¯ããåå¨ããªãã®ãåå ã$this->response->body()ãCakeã®ã³ã¢ã³ã¼ãã§å¼ã³åºãã®ã§ãã®æã«resuponseâ¦
ä»å¹´ãCakePHP Adventã«ã¬ã³ãã¼éå¬ï¼ http://www.adventar.org/calendars/40ããã·ã¥ã¿ã°ã¯ #cakeadvent2012 ã§ããã¿ã¯ä½ã§ãè¯ãã®ã§ãã¾ãã¯ç»é²ãã¦æ£åº§ããªããæ å½æ¥ãè¿ãã¾ãããï¼
ã¾ã ã¾ã CakePHP3.0ã®ãªãªã¼ã¹ã«ã¯æéããããã¨æãã¾ããï¼ãã¶ããã¨1å¹´ãããï¼ãã ãã ãã¨3.0ã®å½¢ãè¦ãã¦ãã¾ãããCakePHP3ããã¯PHP5.4以ä¸ãå¿ é ã«ãªããããªã®ã§ããã¹ãã£ã³ã°ç°å¢ã«ããªãå·¦å³ããããã§ãããããã¤ã³ã¿ã¼ããããä»æ¥ãã¹ãâ¦
æè¡è©è«ç¤¾ããããCakePHP2 å®è·µå ¥éããçºå£²ããã¾ããã http://gihyo.jp/book/2012/978-4-7741-5324-72012/9/29ã«çºå£²ãªã®ã«ããåã¯ãªãä»é ã¨ããæãã§ã¯ããã¾ããã宣ä¼ãããã¨æãã¾ãã ãããæåã¯å¨åº«åããå¿é ãã¦ãã¾ã宣ä¼ããªãã£ããã§â¦
9/1,2ã¨ã¤ã®ãªã¹ã®ãã³ãã§ã¹ã¿ã¼ã§ CakeFest2012ã®ã«ã³ãã¡ã¬ã³ã¹ãéå¬ããã¾ãããä»å¹´ã¯å»å¹´ã¨åãå ´æã§ããã ä»å¹´ãçºè¡¨ããããã¨æã£ã¦ããã©ãè²ã ãªè¦å ã§åå ããªããã¨ã«ãã¦ããã®ä»£ãããã©ã¤ãé ä¿¡ãã±ããã2ä¸åãããã§è²·ã£ã¦å®¶ã§è¦ã¦ã¾â¦
CakePHP2.2ã«ãªã£ãã®ã§ã1.3, 2.0, 2.1, 2.2ã§æ¯è¼ãã¾ããã æ¯è¼ããã³ã¼ãã¯ãpostsãã¼ãã«ãbakeããã ãã®åç´ãªãã®ã§ãã https://github.com/ichikaway/CakePHP-PerformanceCheckSample ãã®ç»é¢ã®ããã«ããã¼ã¸ã³ã°å¦çãå ¥ã£ãindexã¢ã¯ã·ã§ã³â¦
çºè¡¨è³æã§ã CakePHPææ°æ å ± PHPã«ã³ãã¡ã¬ã³ã¹é¢è¥¿2012 View more presentations from ichikaway èã人ãCakeç¥ããªã人ããããã¨ããåæã§ä½ã£ã¦ãã¾ã£ã¦ãæ¦è¦ãå¤ããªã£ã¦ãã¾ãã¾ãããä¼å ´ã«ããã»ã¼99%ã®äººãCake触ã£ããã¨ãã£ã¦ã8å²ãããã®â¦
ãã2.2ã®è¶³é³ãèããã¦ãã¦ã¾ããã ãCakePHP 2.1.2 & 2.2.0-beta releasedã http://bakery.cakephp.org/articles/markstory/2012/04/30/cakephp_2_1_2_2_2_0-beta_releasedCakePHP2.2ã§ã¯ã2.0, 2.1ã¨APIäºæã®ãããã®ã¾ã¾ã¹ã ã¼ãºã«ç§»è¡ã§ãããã§ãâ¦
CakePHPã®ã·ã§ã«ã§Htmlãã«ãã使ã£ã¦HtmlHelper::url()ãå¼ã³åºãã¦ãURLãåå¾ããæ¹æ³ã§ãã CakePHP1.3ããã¼ã¹ã«æ¸ãã¦ãã¾ãï¼CakePHP2ã®å ´åã¯App::uses()ã使ããªã©ããã°ãããã¨æãã¾ãï¼ã Hâ¦
CakePHPåå¼·ä¼ 2012æ¥ @æ±äº¬ ãã¤ã¶ããæ¥ã®Cakeç¥ãã 主å¬è &ã¡ã¤ã³ã»ãã·ã§ã³ã®çºè¡¨è ã ã£ãã®ã«ãã¤ã³ãã«ã¨ã³ã¶ã§æ¬ å¸ãã¾ããã å½æ¥ã¯@mon_satããã¨@hiromi2424ãããç§ã®çºè¡¨è³æãã¤ãã£ã¦å³èãã¬ã¼ã³ãã¦ããã¾ããããããã¨ããããã¾ããï¼çºâ¦
Cake1ç¨ã«ä½ã£ã¦ããXformãã«ãã¼ãCake2.0対å¿ãã¾ããã(CakePHP2.1.1ã§ãåé¡ãªãåãã¾ããï¼ https://github.com/ichikaway/xformHelper/tree/2.0â»ç¾å¨ãPHP5.2ã§ã¯ã¨ã©ã¼ãã§ã¾ãã®ã§ãPHP5.3以ä¸ãåä½æ¡ä»¶ã«ãªãã¾ã(2012/4/18) Xformãã«ãã¼ã¯ãâ¦
ããã¤ãã®ã¨ã¬ã¡ã³ããã¡ã¤ã«ãview/elements/foo/以ä¸ã«ãã£ã¦ããããDBã§æ´æ°ãããã¨ã«ãªãã¾ããã ctpã®å 容ãDBã®1ãã£ã¼ã«ãã«å ¥ãã¦ã表示㯠$this->element(foo/bar)ã®ä»£ããã« DBããåã£ã¦ãããã¼ã¿ãecho($foo['Model']['bar']);ããã°è¯ããâ¦
CakePHPã®ãã©ã°ã¤ã³ã§ãã使ããããªãã®ãã¾ã¨ããCakeplusãCakePHP2ã«å¯¾å¿ãã¾ããã @k1LoWãããå ¨ã¦ã®ä¿®æ£ããã¦ãããã®ã§ãã¼ã¸ããã ãããããã¨ããããã¾ãï¼2.0ãã©ã³ãããå©ç¨ãã ããã https://github.com/ichikaway/cakeplus/tree/2.0ãâ¦
CakePHP1ç³»ã§ã¯ã Model->query('select * from posts where id=?', array('hoge'));ã¿ããã«ãã¦æ¬ä¼¼ãã¤ã³ãã§ãã¾ããããCakePHP2ããã¯ä¸è¨ã®æ¹æ³ã§ããã¨Prepared Statementã§SQLãçºè¡ãã¦ããã¾ãã // in controller $result = $this->Post->getDatâ¦
CakePHP1ã®ã»ãã¥ãªãã£ã³ã³ãã¼ãã³ãã¯ãCSRF対çã¨ããã©ã¼ã æ¹ç«å¯¾çãã»ããã§ãããããä¾ãã°javascriptã§åçã«ãã©ã¼ã ãªã©ã追å ããã¨ãã§ãã¯ã«å¼ã£ãããã¾ããCakePHP2ããã¯ãCSRF対çã¨ãã©ã¼ã æ¹ç«å¯¾çããããããªãã·ã§ã³ã§OFFã«ã§ãã¾ãâ¦
app/Config/bootstrap.phpã§ä¸è¨ã®ããã«ããã¨èªã¿è¾¼ãã¾ãã CakePlugin::loadAll(array( 'FooPlugin' => array('bootstrap' => true, 'routes' => true), ));詳細ã¯ä¸è¨ã http://book.cakephp.org/2.0/en/plugins.html
CakePHP1ã§ã¯ãControllerãModel以ä¸ã®phpãã¡ã¤ã«ãé層åããããã«ããã®ä¸ã«ãã©ã«ããä½ã£ã¦å ¥ãã¦ãåãã®ã§ãããCakePHP2ããã¯èªåæ¢ç´¢ããªããªãã¾ããã ä¾ãã°ãä¸è¨ã®ããã«è¤æ°ãã©ã«ãã«åãã¦ãã¡ã¤ã«ç®¡çããå ´åã app/Contoroller/Adminâ¦
CakePHP2.0.1ããªãªã¼ã¹ããã¾ããã ãªãªã¼ã¹ãã¼ã ãªãªã¼ã¹ãã¼ã(æ¥æ¬èªè¨³)ä»åã®å¤æ´ã§ãHTTPã®ã¬ã¹ãã³ã¹ãããã«content-lengthãã»ããããããã«ãªã£ãã®ã§ãããããã«ãã«ããã¤ãé¢ä¿ã®ä¸å ·åããã£ã¦æ¥æ¬èªã®ã³ã³ãã³ãã ã¨ãã¾ã表示ã§ããªãâ¦
ä»å¹´ãPHPMatsuriã®ã¹ã¿ããã¨ãã¦åå ãã¦ãã¾ããã ãã±ãã販売ãããã«ã®é¨å±ã®æé ãªã©ãã¤ãã³ãåã«ããã¿ã¹ã¯ãçãã ãããã§å¿ãããã¦ããã¤ãéå¬åã«ã絶対æ¥å¹´ã¯ãããããã¨æã£ã¦ãã¾ããã ãã©ãPHPMatsuriãå§ã¾ãã¨180度転æãã¦ãã¾ãâ¦
10/22ï¼åï¼çºå£²ã®Web+DB vol.65ã«CakePHPã®è¨äºãæ¸ãã¾ãããã¿ãªããããããããè²·ã£ã¦ãã ããï¼å 容ã¯ãCakePHP1.3ã§ãã©ã°ã¤ã³ã使ã£ã¦éçºã楽ã«ããã¨ãããã¡ã¤ã³ã«ãã¾ããã @hiromi2424ããã®TransitionComponent, ç§ã®xFormHelper, ããªãã¼ã·â¦
æè¿é¢ãã£ã¦ã http://tipshare.info ã¨ãããµã¤ãã§ç°¡åãªTipsãæ¸ãã¦ã¾ãã çãããæ¯é使ã£ã¦ã¿ã¦ãã ããããã®é±æ«ã« [twitter:@monsat]ãããtipshareã®è¨äºãããã°ã«è²¼ãä»ããããæ©è½ãä½ã£ã¦ãããã®ã§ãgitã®ã³ããããå¾ããåå²ããæ¹æ³ãâ¦