ããªãã®ãæ°ã«å ¥ãã®ãã¬ã¼ã ã¯ã¼ã¯CodeIgniterã帰ã£ã¦ããï¼ï¼CodeIgniter 3.0ã®ææ³ï¼
ãã§ã«ãåãã®äººãå¤ãã¨æãã¾ããã2015å¹´3æ30æ¥ã«CodeIgniter 3.0.0ããªãªã¼ã¹ããã¾ããã
ãã®å½±é¿ããããæ¥æ¬èªã®æ å ±ãå¾ã ã«å¢ãã¦ãã¦ã¾ããããã§ãç§ããã®ãããã§ç¾å¨ã®ææ³ãæ¸ãã¦ãããã¨æãã¾ãã
ï¼åèï¼PHPã«ã³ãã¡ã¬ã³ã¹ç¦å²¡ã§ã®CodeIgniterã«ã¤ãã¦çºè¡¨è³æ
ã©ã¤ã»ã³ã¹ãMITã©ã¤ã»ã³ã¹ã«å¤æ´
ä½ã¨è¨ã£ã¦ãæ大ã®å¤æ´ç¹ã¯ã©ã¤ã»ã³ã¹ãå¤ãã£ããã¨ã§ãã
2.xã¾ã§ã¯ç¬èªã©ã¤ã»ã³ã¹ã®CodeIgniterã©ã¤ã»ã³ã¹ï¼GPLéäºæï¼ã ã£ããã®ãã3.0ããã¯MITã©ã¤ã»ã³ã¹ã«ãªãã¾ããã
ããã¯ãCodeIgniterã®ãªã¼ãã¼ãç§ä¼æ¥ã®EllisLabããã大å¦ã§ããBCITã«å¤ãã£ããã¨ã«ããå®ç¾ãã¾ããã
EllisLabã«ãã3.0ã®ã©ã¤ã»ã³ã¹ã¯OSL 3.0ã«ã¨ããèãããã¨ããªããããªãã¤ãã¼ãªãã®ã«å¤æ´ãããäºå®ã ã£ãã®ã§ãããçµæã¨ãã¦å¤ãã®ã¦ã¼ã¶ãæãããããã¥ã©ã¼ãªMITã©ã¤ã»ã³ã¹ã«ãªãã¾ããã
詳ããçµç·¯ã«ã¤ãã¦èå³ããã人ã¯ä»¥ä¸ãã覧ãã ããã
EllisLabã®çªç¶ã®ã©ã¤ã»ã³ã¹å¤æ´å®£è¨ãããCodeIgniterã©ã¤ã»ã³ã¹ã®GPLéäºæ宣è¨ãããã¦ãé«é£è»ã«ãªã¼ãã³ã½ã¼ã¹ã©ã¤ã»ã³ã¹ã®è§£èª¬ãå§ãããã¨ãªã©ã«ãããé常ã«åæãè¦ããã¦ã¼ã¶ããããã¨ã¨æãã¾ãã
ãããããªã¼ãã¼ãã¢ã«ãããã¯ãªBCITã«å¤ãããå³åº§ã«MITã©ã¤ã»ã³ã¹ã¸ã®å¤æ´ã決å®ããããªã©ãCodeIgniterã«ã¾ã¨ããã¤ãã¦ããEllisLabã«é¢é£ãããã¬ãã£ããªææ ãå®å ¨ã«ææããã¾ããã
æ°ãããªã¼ãã¼ã«ããæ°ããCodeIgniterãããã3.0ã§ãã
ã©ã¤ã»ã³ã¹åé¡ããCodeIgniterã®èº«å£²ãã¸ã¨é·ãç¶ãããã¬ãã£ããªé°å²æ°ã¯å®å ¨ã«è§£æ¶ããã¾ããã
BCITããã³ãã®ããã¸ã§ã¯ããªã¼ãã®jlpãããã¦ãCodeIgniterããã¾ãå¦çããEllisLabã«ãæ¬æã表ãããã¨æãã¾ãã
APIã®å¤æ´ç¹ã¯å°ãªã移è¡ã³ã¹ãã¯ä½ã
æ°ããCodeIgniterã§ããã2.xããã®å¤æ´ç¹ã¯ãããªã«å¤ãããã¾ããã移è¡ã³ã¹ãã¯ä½ãã§ãããã¹ã¦ã®1.xã2.xã¦ã¼ã¶ã«3.0ã¸ã®ç§»è¡ããè¦ããã¾ãã
ä½ã¨è¨ã£ã¦ãMITã©ã¤ã»ã³ã¹ã§ããããããããªã¬ãªã¬ãªã¼ãã³ã½ã¼ã¹ã§ã¯ããã¾ãããOSIèªè¨¼ã®ãªã¼ãã³ã½ã¼ã¹ã©ã¤ã»ã³ã¹ã§ãã
ç§ããCodeIgniterå¾¹åºå ¥éãã®ãµã³ãã«ã¢ããªï¼CodeIgniter 1.6.1ç¨ï¼ãã¢ããã°ã¬ã¼ããã¦ã¿ã¾ããããã¢ããã°ã¬ã¼ãã ããªã1æ¥ãæããã¾ããã§ããã
å¤æ´ç¹ã®è©³ç´°ã¯ã¦ã¼ã¶ã¬ã¤ãã«ç´°ããè¨è¿°ããã¦ãã¾ãã®ã§ãã¢ããã°ã¬ã¼ãã®éã¯å¿ ã確èªãã¾ãããã
- Upgrading From a Previous Version â CodeIgniter 3.0.0-dev documentation
- 以åã®ãã¼ã¸ã§ã³ããã®ã¢ããã°ã¬ã¼ã â CodeIgniter 3.1.0-dev ããã¥ã¡ã³ã
ãªããã¯ã©ã¹ãã¡ã¤ã«ã®ãã¡ã¤ã«åã¯å é ã大æåã¨è¦ç´ã§å®ãããã¾ãããã¯ã©ã¹ãã¡ã¤ã«ã ãã§ããã¥ã¼ãè¨å®ãã¡ã¤ã«ã¯å°æåã§ãã
ããã«ã¤ãã¦ã¯ããã§ãã«ã¼ãä½æãã¾ããã
Composer対å¿
ã¾ããå人çã«æ¬¡ã«éè¦ãªå¤æ´ç¹ããComposer対å¿ãããã¨ã§ããComposerã®å©ç¨ã¯ãªãã·ã§ã³ã§ã使ãããå ´åã¯è¨å®ãã¡ã¤ã«ã§è¨å®ãã¾ãã
ããã«ãããComposerã®ããã±ã¼ã¸ãèªç±ã«ä½¿ãã¾ãããComposerã®ãªã¼ããã¼ãã使ãã¾ãã
ã¾ããCodeIgniteræ¬ä½ã®Composerããã®ã¤ã³ã¹ãã¼ã«ãã¢ããã°ã¬ã¼ããå¯è½ã«ãªãã¾ããã
ã¯ã»ãæ¸ã£ã
ãã¨ãã¨CodeIgniterã¯1.xæ代ã«$_GET
ãã»ãã¥ãªãã£ä¸ã®çç±ãã使ããªãã¿ãããªç¬èªã®ä»æ§ãããã¤ãããã¾ããã
ã¯ã¨ãªæååã¯æ¹ç«ãããããã¾ããæ¼ããããã§ãããã»ãã¥ãªãã£ä¸ã®ãªã¹ã¯ã$_POST
ãªã©ã¨æ¯è¼ãã¦è¥å¹²é«ãã¨ãããªã¹ã¯åæã¯å¯è½ã ã¨ã¯æãã¾ãã
ããããã ããã¨è¨ã£ã¦$_GET
ããã¬ã¼ã ã¯ã¼ã¯ãã¯ãªã¢ãã¦ãã¾ãä¸å使ããªãã¨ããã®ã¯ä¸ä¾¿ãããã¨ããã¹ãã§ããããHTTPçã«ãGETã¡ã½ããã§ã¯ã¨ãªæååã§æ¸¡ãå ´åã¨POSTã¡ã½ããã§æ¸¡ãå ´åã¯æå³ãç°ãªãã¾ããã
ãã®ä»æ§ã¯2.0ã§å¤æ´ããã$_GET
ã使ããããã«ãªã£ã¦ãã¾ãã
ãã®ãããªç¬èªã ã£ãç¹ãä»æ§çã«çåã®ãã£ãç¹ã3.0ã§ãæ¹åããã¦ãã¾ãã
詳ããçç±ã¯ç¥ãã¾ããããã»ãã·ã§ã³ã®å®è£
ãå®å
¨ã«æ¸ãç´ãããã»ãã·ã§ã³ãã¼ã¿ã¯ããã©ã«ãã§ãã¡ã¤ã«ãã¼ã¹ã«ãªãã$_SESSION
ã使ããããã«ãªãã¾ããã
ã¾ããXSSãã£ã«ã¿ãå ¥åãã£ã«ã¿ã¨ãã¦ä½¿ãã¹ãã§ãªããã¨ãã¦ã¼ã¶ã¬ã¤ãã«æè¨ããã¾ããã
ããããããã¼ã¿ãã¼ã¹ã®æä½ã§ãActive Recordãã¨å¼ã°ãã¦ãããã®ã¯ãããé©åãªå称ã§ãããQuery Builderãã«æ¹åããã¾ããã
å®ã¯ãããªã«é£ãããªãCodeIgniterã§ã®ãã¹ã
æ¨æºã®ã¦ããããã¹ãã¯ã©ã¹ãå°ã æ©è½ä¸è¶³ã§ããç¹ã¯3.0ã§ãå¤æ´ã¯ããã¾ããã
ã¾ããCodeIgniteræ¬ä½ã®ãã¹ãã¯PHPUnitã«ããé²ãã§ããã«ãã¼çãåä¸ãã¦ãã¾ãããã¢ããªã®PHPUnitã§ã®ãã¹ãã«ã¤ãã¦ã¯3.0ããªãªã¼ã¹ããã¦ãé²å±ã¯å ¨ãããã¾ããã§ããã
PHPUnitã§ã®ãã¹ããç°¡åã«æ¸ããªãã®ã¯ãããã«å°ãã¾ãã®ã§ãã¼ãããããªãã¸ãã¼ã«ãæ¸ããã¨ã«ãã¾ããã
ããã§ãCodeIgniterã§ãPHPUnitã§ç°¡åã«ãã¹ããæ¸ããã¨ãã§ããããã«ãªãã¾ããããã¹ãã«ãã¼ç100%ãå¿ è¦ã§ããã°éæã§ãã¾ãï¼ã¢ããªã®ã³ã¼ããããããªãã°ï¼ã
å®ã¯CodeIgniterã¯ãã¨ãã¨æ§é çã«Dependencyï¼ä¾åãªãã¸ã§ã¯ãï¼ãç°¡åã«äº¤æå¯è½ã«ãªã£ã¦ãã¾ãããã¼ãããã¢ãã«ãã©ã¤ãã©ãªã¯ãCodeIgniterã¹ã¼ãã¼ãªãã¸ã§ã¯ãã®ããããã£ã«åçã«è¿½å ããããããã¯publicãªããããã£ã§ããããå¤é¨ããç°¡åã«æ³¨å ¥ã§ãã¾ãã
å¿ è¦ãªä¾åãªãã¸ã§ã¯ããã¢ãã¯ã§ç½®ãæãã¦ãã¾ãã°ã¦ããããã¹ããå¯è½ã§ãã
åé¡ç¹
åé¡ç¹ã«ã¤ãã¦ãæ¸ãã¦ããã¾ãã
åºæ¬çãªè¨è¨ã¯1.xã®æ代ããå¤ãã£ã¦ãã¾ããããã®æå³ã§CodeIgniterãã¬ã¬ã·ã¼ã§ãããã¨ããã¾ããã£ã¡ãã¨ããOOPã§ã¯ãªããã¨ã¯ç¢ºãã§ãã
ã¾ãã3.0ã§ãPHP 5.2.4以ä¸ã¨ããè¦ä»¶ï¼ãã ããPHP 5.4以ä¸ãæ¨å¥¨ï¼ãªã®ã§ãCodeIgniteræ¬ä½ã§ã¯ææ°ã®PHPã®æ©è½ã使ããã¨ã¯ã§ãã¾ããã
ããããã¦ã¼ã¶ã®ä½æããã¢ããªã§ã¯ææ°ã®PHPã®æ©è½ã使ããã©ããã¯ã¦ã¼ã¶ã®èªç±ãªã®ã§ãå®éã«åé¡ã«ãªãã¨ããã¯ã»ã¨ãã©ãªãã¨æãã¾ãã
ç§ãèããæ大ã®åé¡ç¹ã¯ãã³ã³ããã¼ã©ã«åå空éã使ããªããã¨ã§ããããã ãã¯ãCodeIgniteræ¬ä½ã«æãå ¥ããªãã¨ä»ã®ã¨ããç¡çã§ãã
ï¼2016-07-03 追è¨ï¼ https://github.com/kenjis/codeigniter3-namespaced-controller ã«ã¦CodeIgniter 3.0ã§ã®åå空éä»ãã®ã³ã³ããã¼ã©ã®ãµãã¼ãã®éçºãå§ãã¾ããã
ãã¨ã¯ãã©ããã¦ãDIã³ã³ãããã¢ããªå ¨ä½ã«ä½¿ãããã¨ããå ´åããããCodeIgniteræ¬ä½ã«æãå ¥ããªãã¨ç¡çã§ãã
ãã ããããããæ¬å½ã«åé¡ã¨ãªããããªç¶æ³ã¯ãã¾ããªãããã«æãã¾ãã
ã¾ã¨ã
CodeIgniter 3.0ã¯å¤§ããªå¤æ´ã¯ããã¾ãããããããããªç¹ã§çå®ã«ãããªã£ã¦ããã使ãåæã¯ä»¥åã®ãã¼ã¸ã§ã³ã¨å¤ããã¾ããã
éå»ã«CodeIgniterã使ã£ããã¨ããã人ã§ããã°ãããã«ç§»è¡ã§ãæ £ããã§ãããã
è¦ç´ããããå°ãªãã®ã§åå¿è ã§ãç°¡åã«ä½¿ãå§ãããã¨ãã§ããã¾ããèªç±ã«èªåã§çµã¿ç«ã¦ã¦ä½¿ã£ã¦ãããã¬ã¼ã ã¯ã¼ã¯ãªã®ã§ãä½è¨ãªãã®ã¯ããã¾ããããããããããªãé»éè¡ã¿ãããªãã®ããªããç解ãããããã§ãããã
ç¾å¨ãåå空éãç¥ããªãã¦ã使ããã¨ãã§ããå¯ä¸ã®ã¡ã¸ã£ã¼ãªãã¬ã¼ã ã¯ã¼ã¯ã§ã¯ãªããã¨æãã¾ãã
ã¾ããComposerã«å¯¾å¿ãããã¨ã«ãããããã±ã¼ã¸ï¼ã©ã¤ãã©ãªï¼ãçµã¿åããã¦ããã¨ããã¢ãã³ãªéçºã«ã対å¿å¯è½ã§ãã
ãã³ãã¬ã¼ãã¯Twigã§ãORMã¯Doctrineã§ã¨ããä»ã©ãã®æ§æãå¯è½ã§ãï¼ã¾ãã2.xã§ãã§ããã®ã§ããããï¼ã
ããã©ã¼ãã³ã¹ã2.xã¨ãã¶ãã»ã¼å¤ãããªãã¨æãã¾ããHello Worldãã³ããã¼ã¯ã§ã¯ä»ã§ãPHPã§å®è£ ããããã¬ã¼ã ã¯ã¼ã¯ã§ã¯æéã®é¨é¡ã«å±ãã¾ããééç´ã§ããSymfonyãLaravelã®7ã10åã®æ°å¤ãåºã¦ãã¾ãã
ãã以ä¸ã®ããã©ã¼ãã³ã¹ãå¿ è¦ãªå ´åã¯ãPhalconãªã©ã®Cã§å®è£ ããããã¬ã¼ã ã¯ã¼ã¯ã使ãå¿ è¦ãããã§ãããã
CodeIgniter 3.0ã¯ãããªãã®ãæ°ã«å ¥ãã®ãã¬ã¼ã ã¯ã¼ã¯CodeIgniterãæ¬å½ã®ãªã¼ãã³ã½ã¼ã¹ã¨ãã¦å¾©æ´»ããã¨ããè¨å¿µãã¹ããã¼ã¸ã§ã³ã§ãããã
ç§ã¯ãã®ãããã§ãresurrectionãã¨ããåèªãè¦ãã¾ããã
é¢é£
Date: 2015/07/09