ã¤ã³ã¹ãã¼ã©ã®ä½ãæ¹èª¿æ»
ã¤ã³ã¹ãã¼ã©ãä½ãããã
ã§ããã°ããµã¼ãã«ã½ã¼ã¹ãã¢ãããã¼ãâãã©ã¦ã¶ã¢ã¯ã»ã¹ãä¸é¨ãã¼ã¿(管çID,ãã¹ã¯ã¼ããªã©ï¼ãå
¥åâå®è¡ãã§ãã§ããã ãå
¨ã¦ãæ¸ããããªã¤ã³ã¹ãã¼ã©ãã
åºæ¬çãªã¤ã³ã¹ãã¼ã©ã®ä½ãæ¹ã®ä¸ä¾ãè¨è¼ããè¨äºãè¦ã¤ããã®ã§ãèªè§£ãã¤ã¤ããã¤ã³ãã¾ã¨ãã
Writing an installer for your CakePHP application - cakebaker
ä¸è¨è¨äºã®å
容ãè¸ã¾ãã¦è¦ãã¨ãCroogoãCandyCaneã¤ã³ã¹ãã¼ã©ããå²ã¨å®¹æã«ç解ã§ãã¾ããã
åºæ¬ã¤ã³ã¹ãã¼ã©ã«ã¤ãã¦
ããã¼è¦ç´
1. route.phpï¼app/tmp/以ä¸ã«âã¤ã³ã¹ãã¼ã«æ¸ã¿âç®å°ã®ãã¡ã¤ã«ããªãå ´åã以ä¸ã®installerã³ã³ããã¼ã©å®è¡
2. indexã¢ã¯ã·ã§ã³ï¼ç¹ã«å¦çãªããã¤ã³ã¹ãã¼ã«éå§ã¡ãã»ã¼ã¸ï¼ãã¿ã³ã§ã表示ãããï¼
3. databaseã¢ã¯ã·ã§ã³ï¼ã»ããã¢ããSQLãå®è¡ã
4. thanksã¢ã¯ã·ã§ã³ï¼çµäºç»é¢è¡¨ç¤º
è¯ãç¹
- SQLãã³ãæ å ±ããã¼ã¹ã«ã»ããã¢ããã§ããã®ã§ãCakeSchemaでNGのENUMやInnoDBãOKãåæå¤è¨å®ãOKãããããéçºç¨ã»ããã¢ããSQLãããªãæµç¨ã§ããã
- index()ãdatabase()ã®éã«ãåæå¤å ¥åãç»é¢ãæãã§å¤ãå¼ãç¶ãã°ã管çã¢ã«ã¦ã³ããªã©ã®åæå¤ãã¦ã¼ã¶å ¥åã§è¨å®å¯è½ãã
- DBã®prefixè¨å®ã¯ãdatabase.phpã§è¨å®ãã¦ããã°ãã¶ãOKã
è¦æ¹åç¹
- âã¤ã³ã¹ãã¼ã«æ¸ã¿âã®ç®å°ãã¡ã¤ã«ãapp/tmp以ä¸ã«ããã®ã¯ããããªãã®ãã
tmpãã£ã¬ã¯ããªã®ãã¡ã¤ã«ï¼éç¨ä¸ã«åé¤ãã¦åé¡ãªã ã§ãã£ãæ¹ãããã¨æãã
- database.phpã¯æåã§ä½æã®å¿ è¦ãã
Croogo ver1.3ã®ã¤ã³ã¹ãã¼ã©
以ä¸ãè¸ã¾ãã¦ãCakePHPãã¼ã¹ã®ã¤ã³ã¹ãã¼ã©ä»ãCMSï¼Croogo(ver.1.3)ã®ã½ã¼ã¹ãã¿ã¦ã¿ã¾ããã
Downloads · croogo/croogo · GitHub
Croogoã®ã¤ã³ã¹ãã¼ã©ã¯ãapp/plugin以ä¸ã«ããã¾ãã
è¦ç´
1. route.phpâcroogo_route.phpï¼ãapp/config/以ä¸ã«setting.ymlããªãå ´åãinstallerå®è¡ã
2. indexã¢ã¯ã·ã§ã³ï¼Viewã§ãå種è¨å®ï¼tmpãã£ã¬ã¯ããªã®æ¨©éã»configãã¡ã¤ã«ä½ææ¸ã¿ãªã©ï¼ã®ãã§ãã¯ï¼è¡¨ç¤º
3. databaseã¢ã¯ã·ã§ã³ï¼ç®¡çã¢ã«ã¦ã³ãæ
å ±ï¼IDã¨ãã¹ã¯ã¼ããDBåï¼ã®å
¥åâdatabase.phpãä½æ
4. dataã¢ã¯ã·ã§ã³ï¼ã»ããã¢ããSQLãå®è¡ã
4. finishã¢ã¯ã·ã§ã³ï¼ã¤ã³ã¹ãã¼ã«é¢é£ãã¡ã¤ã«åé¤âsetting.ymlä½æâcore.phpã®saltèªåæ¸ãæãâçµäºç»é¢è¡¨ç¤º
è¯ãç¹
è¦æ¹åç¹
- setting.ymlä¸è¦
- DBã®prefixè¨å®ã¯ãããã©ã«ãã§ã¯ä¸å¯ãã¤ã³ã¹ãã¼ã«ç¨database.php.installãæåã§å¤æ´ããå¿ è¦ããã
CandyCaneã®ã¤ã³ã¹ãã¼ã©
CandyCaneã¯ãCakePHPãã¼ã¹ã®ããã¸ã§ã¯ã管çã·ã¹ãã ãRubyã®æåããã¸ã§ã¯ã管çã¦ã§ã¢ã»Redmineã®PHP移æ¤çã ããã§ãã
RedmineをPHPに移植した·CandyCane MOONGIFT
ã¤ã³ã¹ãã¼ã©ã¯Croogoããã¼ã¹ã¨ãã¦ããããã§ãããããã¤ãéããããã¾ãã
http://thechaw.com/candycane/source/branches/master/app/plugins/install/
è¯ãç¹
- ãã¤ã³ã¹ãã¼ã«æ¸ã¿ãå¤å®ãdatabase.phpã®åå¨ãã§ãã¯
http://thechaw.com/candycane/source/app/config/routes.php
- prefixãã¦ã¼ã¶å ¥åã§è¨å®OK
CandyCaneã®ã¤ã³ã¹ãã¼ã©ããã¼ã¹ã«å®è£ ããã®ãããããã§ãã