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)); }
/** * * @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']); }
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); }
public function __construct($filepath = NULL) { $this->facade = new ControllerFacade($filepath); $this->name = String::cutSuffix($this->facade->name, 'Controller'); $this->filepath = $filepath; }