Пример #1
0
 public function editRecipe($arguments)
 {
     $recipeClassName = String::classNameFromPath($arguments['recipe']);
     $recipe = new $recipeClassName();
     chdir($arguments['path']);
     $this->render(str_replace('.', '/', String::cutSuffix($arguments['recipe'], 'Recipe')) . '/Edit', array('recipe' => $recipe));
 }
Пример #2
0
 /**
  *
  * @return string Rendered string
  * @api
  */
 public function render()
 {
     $string = $this->arguments['string'];
     if ($string === NULL) {
         $string = $this->renderChildren();
     }
     return String::cutSuffix($string, $this->arguments['suffix']);
 }
Пример #3
0
 public function getUncachedControllersValue()
 {
     $value = array();
     foreach ($this->facade->uncachedControllers as $controller => $actions) {
         foreach ($actions as $action) {
             $value[] = String::cutSuffix($controller, 'Controller') . ':' . String::cutSuffix($action, 'Action');
         }
     }
     return implode(',', $value);
 }
Пример #4
0
 public function __construct($filepath = NULL)
 {
     $this->facade = new ControllerFacade($filepath);
     $this->name = String::cutSuffix($this->facade->name, 'Controller');
     $this->filepath = $filepath;
 }