moony
å¹´è¶ãåã«ã²ã¨ã¤æ±ºå®ãmoonyã®éçºããã°ããåæ¢ãã¦ããã°ããkarintoã ãéçºããæãã«ãã¾ãããã¡ãã¡å®£è¨ãããããªãã¨ã§ããªããã©ä¸å¿åºåãã¨ãã¦ããã°ã¨ãè¦ã¤ãããç´ãã¾ããã©ãæã£åãæ©ãã¨ããæå³ã§moonyã¯ä¸éå端ã«ãªã£ã¦ããããã¡â¦
ããããã°è¡¨è¨ãå°æåã§ãmoonyãã«å¤ãããç¹ã«æå³ã¯ãªããã¾ãã£ããæ¹ãããããããªã¨æã£ãã ãããã°ããããã§è¡ãã¾ãã
ææ°çã®moonyã§ã¯ã__autoloadé¢æ°ã使ã£ã¦ãMoony_ãã§ååãå§ã¾ãã¯ã©ã¹ãèªåçã«ãã¼ãããããã«ãã¦ãããã ããå®ã¯ãmoonyã«ãã¾ãã§ã¤ãã¦ããã¢ããªã³ã¯ã©ã¹ã¯æ¬¡ã®ããã«ä½¿ããã¨ãã§ããï¼require_onceã¨ããããªãï¼ã $logger = new Moony_Adâ¦
PATH_INFOã使ã£ã¦ãã£ã¹ããããã¼ãã«ã¬ã¹ 1ã¢ã¯ã·ã§ã³1ãã¡ã¤ã« validationæ©è½ã¯æã£ã¦ãªã ãã³ãã¬ã¼ãã¯phpãã¡ã¤ã« Moony_Action::fetchããªã¼ãã¼ã©ã¤ãããã°Smartyã使ãããã© ãã³ãã¬ã¼ããã¡ã¤ã«ã ãã§ãåã ã¢ã¯ã·ã§ã³ã¯ã©ã¹ããªãã£ããç´â¦
moonyã®ã¯ã¦ãªãã¼ã¯ã¼ãã®ãã¼ã¸ãç´ããã¤ã®Amazonãªã³ã¯ããã£ã±ãã ãï¼ http://d.hatena.ne.jp/keyword/moony
ãµã¨æã£ããã¨ãvalidationã£ã¦æ¥åãã¸ãã¯ã ãããä»ã¾ã§çµé¨ãã¦ããããã¸ã§ã¯ããå ã«èããã¨ãããã¸ã§ã¯ãã«ãã£ã¦validationã®ã«ã¼ã«ã£ã¦çµæ§ã¾ã¡ã¾ã¡ããã¬ã¼ã ã¯ã¼ã¯ã§ç¨æããã¦ãããã®ã§ä½¿ãããã®ãããã°ä½¿ãæãã§ï¼Strutsã®validationã¨â¦
ããid:clonedã«è©¦ããã¦ããï¼2008-11-12ï¼ãã¾ãããmoonyãPHP5çã«trunkã®å·®ãæ¿ãããã¾ããããããã«PHP4ã¯ããããããªãã¨ããæãã§ãhttp://code.google.com/p/moony/ã¾ã ãã¹ãã¨ããã¥ã¼ãã³ã°ã¨ãå ¨ç¶ãªã®ã§ããããããã©ãã·ã¥ã¢ããããæâ¦
Moonyã®PHP5対å¿çãä½ã£ã¦ã¾ãããå®æããã¤ã«ãªããããããªããã©ãSubversionã§php5ã£ã¦ãã©ã³ããåã£ããã®ã®ãã¨ããããæå ã§ãã«ããã«ãæ¸ãã¦ã¾ããphp5-testflightçã¨ãã¦ãæåã¯ã¡ããã¡ããæ¸ãç´ãã°PHP5ã«å¯¾å¿ï¼ã¨æã£ãã®ã ãã©ãããâ¦
ããªãããï¼ã¬ã³ã¿ã«ãµã¼ãã¼ | å©ç¨å®ç¸¾170ä¸äººçªç ´ï¼ç¡æSSLãã ããã¯MoonyãPHP5åããã£ã¦ãã¨ã§ããããã§ããã# catwalker.jpã¯ããªãä¸ã§åãã¦ã¾ããã ãPHP5ã¯CGIçã§åããããã®ãæ°ã«ãªãã¨ããã
Moonyã«ç°¡åãªã¬ã¤ã¢ã¦ããã³ãã¬ã¼ãã®æ©è½ã追å ãããæååããã³ãã¬ã¼ãã®åå¾çµæã¨ç½®æããã ãã®åç´ãªã³ã¼ããã§ãå¿ è¦ååãæè¿ã¯æ©è½ã追å ãããã¨ã¯å ¨ç¶èãã¦ããªãã¦ãããã«ãããã«ã«ã¾ã¨ãããã°ããèãã¦ãããæ¬å½ã«å¿ è¦ãªæ©è½ã ãã«â¦
Moonyã ãã©ãwebã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã®ã³ã¢ã«é¢ä¿ããªãæ©è½ã¯Addonã¨ãã¦ã¾ã¨ãã¦ãã¾ããã¨ã«ãããAddonãã£ã¬ã¯ããªä½ã£ã¦ãã®ä¸ã«æ¼ãè¾¼ãæããåºæ¬çã«ã¬ã³ã¿ã«ãµã¼ãã¼ã§ä½¿ããããããªç³»ã®ã©ã¤ãã©ãªãä½ã£ã¦ãããããªãã¨ã
viewãã«ãã¼ã®å®è£ ãé¢æ°ãã¼ã¹ã«ããããªãã¸ã§ã¯ããã¼ã¹ã«ãããè¿·ããé¢æ°ã§ããããªã¼ãã¨æã£ãããªãã¸ã§ã¯ãã«ãã¦ãããæ¹ãå®è£ ã¨ãã¡ã³ããã³ã¹æ¥½ããã¨æã£ãããã©ã£ã¡ããããããã inputText('name'); ?> PHPã®å ´åãå²ã¨é¢æ°ãã¼ã¹ã§ããâ¦
CakePHPã¯Viewããå²ã¨ãããããªæ å ±ã«ã¢ã¯ã»ã¹ã§ããã ããããã°ãViewã«ã¤ãã¦ã¯ãã¾ãèªããã¦ããªã: CakePHP ã®ããããé£ã¹æ¹ Viewã¨ããããã³ãã¬ã¼ãããã¢ã¯ã·ã§ã³ã®å¤æ°ã«ã¢ã¯ã»ã¹ã§ãããããã®å¿ è¦ããªããããã°ä¾¿å©ãªã®ã¯ããã£ã¦ããã ãâ¦
Moonyã®ã³ãã¼ã¨ãããæ¨èªã®ãããªãã®ãã¼ãããèãã¦ããã the PHP simplistic framework the tiny web application framework ã¾ããªãã§ãããã¨ããã°ããã®ã ããå¤ãªæãã®æ¨èªãã¤ããããªã¼ã
Moony::importãããªãã¦Moony::loadã«ããã
ãã¬ã¼ã ã¯ã¼ã¯ä½ã£ã¦ãã¨ããã¥ã¼ã®ãã«ãã¼ã¯ã©ã¹ãä½ãã«ããã£ã¦ Moony_Helper Moony_View_Helper ã®ã©ã¡ãã®ã¯ã©ã¹åããããå²ã¨ã©ãã§ããããã¨ã§ããããèãããããããã³ãã¬ã¼ãããã©ãå¼ã³åºãã®ãã¨ããå ¨é¨1ã¤ã®ã¯ã©ã¹ã§å®è£ ããã®ãã©ããâ¦
ä¾ãã°ãã¢ã¯ã·ã§ã³ã§æ¬¡ã®ããã«å¤ãè¨å®ããã¦ããå ´åã stash['name'] = array('yamaoka', 'hiroyuki'); $this->render(); } } ãã³ãã¬ã¼ãå ã§nameã£ã¦ããååã®inputè¦ç´ ãhelperã§ä½ãã¨ãããªã£ã¦ã»ãã <input type="text" name="name[]" value="yamaoka" />
ããç¨åº¦ä¸èº«ã®å®è£ ãã§ããã¨ãã¨ã¯viewãã«ãã¼ãã»ãããªããã©ããããµãã«ä½¿ããã¨ãããã ãã inputText('yourname', array('id' => 'yourname')); ?> ãããªæãã«ãã«ãã¼ã®ã¤ã³ã¹ã¿ã³ã¹ããã³ãã¬ã¼ãå ã§ä½¿ããããã«ããã°ããããªãããã«ãã¦â¦
ãã¾ãèããã«Moony_Logger_Fileã¨Moony_Cache_Fileã®ã¯ã©ã¹ãä½ã£ã¦ã¿ãããããããããã¹ããã°ãåºåããã¯ã©ã¹ããã¡ã¤ã«ãã£ãã·ã¥ãè¡ãã¯ã©ã¹ã info('this is a message'); Moonyã®åã¯ã©ã¹ããã¼ãããããã®staticã¡ã½ããããimportãã¨åä»ãâ¦
ããããã°ãæè¿Moonyãä½ãåæ©ãèªåã®ãµã¤ãæ§ç¯ç¨ãªã®ã§ãã¨ã³ã¿ã¼ãã©ã¤ãºã£ã½ãæ©è½ã¯ãã¾ãå ¥ããªãã¨æãã¾ããã©ã¡ããã¨ããã¨åç §ç³»ã®æ©è½ãä¸å¿ã ã£ããããããã ããvalidatorãªãã¦ãªãã¦ãããããªã¨æã£ã¦ãã¾ã£ãããããããã§ããã# â¦
SQLiteç¨ã®Daoããã«ããã«ãæ¸ããããããªæãã§ä½¿ããSQLæ¸ããã人ãªã®ã§ãèªåãªã³ãªã¼ã®å ´åã¯Daoãç¨æãã¦SQL渡ãã®ã好ãã connect($dbFileName); $result = $dao->query('select * from foo;'); ã§ãSQLiteé¢æ°ã®ããã¥ã¢ã«ãè¦ã¦ããã¨ãæ°ã«ãªâ¦
Moonyã®ãã´ã¨ãã¼ãããèãã¦ã¿ããå ¨ãä½ãæãæµ®ãã°ãªããå°ã£ã
è¦ããã«ãã¯ã©ã¹ã«ãã¦ã/*** ã */ãã®å½¢å¼ã§ãã¹ããæ¸ãã¦ããã°rhacoã®DocTestã使ããã£ã¦ããã ããã¹ããã¼ã«ã¨ãã¦rhacoã使ãã£ã¦ã®ã¯å²ã¨ããã ãªãrhaco++
Moonyã¯åºæ¬çã«webãã¬ã¼ã ã¯ã¼ã¯ã¨ãã¦ã®æ©è½ããããã©ã«ãã§ã¯æä¾ããªãããã«ãããã¨æããã ãã©ï¼O/Rãããã¼ã¨ããããªãï¼ãwebãµã¤ãä½ãã¨ãã«ãããã»ãããªã¼ã£ã¦æ©è½ã¯å²ã¨ãããç°¡åãªDaoã¯ã©ã¹ã¨ãããã£ãã·ã¥ãåãæ±ããããªã¯ã©ã¹ã¨ãâ¦
ãªããViewãã«ãã¼çãªé¢æ°ãMoonyã§ããããä½ããã¨ãã¦ããã©ãphp_speedyã§ããããããªããã¨è¨ãæ°ããã¦ãããçµã¿åããã¦ä½¿ãæãã§ããã³ãã¬ã¼ãæç»é¨åãä»»ãã¡ãããããªãâ¦ã
Moonyã«ã¯ããã©ã«ããã³ãã¬ã¼ãã¨ããä»çµã¿ããããã¾ããã¢ã¯ã·ã§ã³ã¯ã©ã¹ã®renderã¡ã½ããã®å¼æ°ã¨ãã¦ãã³ãã¬ã¼ãåãçç¥ãããå ´åãããã©ã«ããã³ãã¬ã¼ããèªåçã«ä½¿ãããããã«ãªã£ã¦ããã¢ã¯ã·ã§ã³ã¯ã©ã¹ããFoo_Barãã ã£ããããfoo/bar.pâ¦
ãã£ã±ãMoonyã¯PHP5ã®ã¿å¯¾å¿ã«ãã¹ãã ããããæ©ããä¾å¤ã使ããã¨ä¾¿å©ãªãã¨ã¯ç¢ºããªã®ã§ãã¯ã©ã¹ã®ããããã£ã¨ãã»ã¨ãã©publicæ±ãã«ãããã©ãªï¼
ããã·ã³ãã«ã«ç¬¬2å¼¾ããã³ãã¬ã¼ãviewé¢é£ã®ã½ã¼ã¹ã1ãã¡ã¤ã«ã«ã¾ã¨ãããMoony_Viewã¯ã©ã¹ï¼phpãã³ãã¬ã¼ããæ±ãã ãã®ã¯ã©ã¹ï¼ãè¨è¿°ãããã¡ã¤ã«ã«ãç´ã«ãã«ãã¼é¢æ°ãå®ç¾©ãä¸ç®æã«ã¾ã¨ãã¦ãã¾ããã¨ã«ãççµåãããªããã©å°ããªãã¬ã¼ã ã¯ã¼ã¯â¦
ä¼ç¤¾ã®å宿ã§ä½ã£ã¦ã¿ãMoonyã®ãã©ã°ã¤ã³æ©æ§ã ãã©ãåãå¤ããã¨ã«ãããä½ãç ©éã«ãªããããæ°ãããããå¿ è¦ãªãMoony_Actionã®ãµãã¯ã©ã¹ã§å®è£ ãã¦ãããç¶æ¿ããã°ããããã§ããã ãã·ã³ãã«ã«ãã¦ãããã