Source for file AddViewTest.php

Documentation is available at AddViewTest.php

  1. <?php
  2. /**
  3.  *  AddViewTest.php
  4.  *
  5.  *  @author     halt feits <halt.feits@gmail.com>
  6.  *  @package    Ethna
  7.  *  @license    http://www.opensource.org/licenses/bsd-license.php The BSD License
  8.  *  @version    $Id: c679586e85f60cca1e2156a888b8140f36e672f0 $
  9.  */
  10.  
  11. require_once 'Ethna/class/Plugin/Handle/AddView.php';
  12.  
  13. // {{{ Ethna_Plugin_Handle_AddViewTest
  14. /**
  15.  *  add-view-test handler
  16.  *
  17.  *  @author     halt feits <halt.feits@gmail.com>
  18.  *  @access     public
  19.  *  @package    Ethna
  20.  */
  21. {
  22.     /**
  23.      *  add view test
  24.      *
  25.      *  @access public
  26.      */
  27.     function perform()
  28.     {
  29.         $r $this->_getopt(array('basedir=''skelfile='));
  30.         if (Ethna::isError($r)) {
  31.             return $r;
  32.         }
  33.         list($opt_list$arg_list$r;
  34.  
  35.         // view_name
  36.         $view_name array_shift($arg_list);
  37.         if ($view_name == null{
  38.             return Ethna::raiseError('view name isn\'t set.''usage');
  39.         }
  40.         $r Ethna_Controller::checkViewName($view_name);
  41.         if (Ethna::isError($r)) {
  42.             return $r;
  43.         }
  44.  
  45.         $ret $this->_perform('ViewTest'$view_name$opt_list);
  46.         return $ret;
  47.     }
  48.  
  49.     /**
  50.      *  get handler's description
  51.      *
  52.      *  @access public
  53.      */
  54.     function getDescription()
  55.     {
  56.         return <<<EOS
  57. add new view test to project:
  58.     {$this->id} [-b|--basedir=dir] [-s|--skelfile=file] [view]
  59.  
  60. EOS;
  61.     }
  62.  
  63.     /**
  64.      *  @access public
  65.      */
  66.     function getUsage()
  67.     {
  68.         return <<<EOS
  69. ethna {$this->id} [-b|--basedir=dir] [-s|--skelfile=file] [view]
  70. EOS;
  71.     }
  72. }
  73. // }}}

Documentation generated on Fri, 11 Nov 2011 03:57:30 +0900 by phpDocumentor 1.4.3