/** * Регистрирует в системе "вставку" (Insertion) * * @param string $class * @param string $method */ static function register_insertions() { $args = func_get_args(); $class = $args[0]; array_shift($args); foreach ($args as $arg) { $name = $arg; $func = $arg; if ($m = Core_Regexps::match_with_results('/^(.+):(.+)$/', $arg)) { $name = $m[1]; $func = $m[2]; } Text_Insertions::register_filter(array(strtolower($name) => new Core_Call($class, $func))); } }
protected function setup() { $dir = $this->dir(); Text_Insertions::filter()->add_views_paths(array($dir . '/app/views', $dir . '/views')); }
protected function filter_custom($content) { return Text_Insertions::filter()->process($content, array('layout' => $this)); }