/** * Alias for the sanitize method. * * @param string $text The text to be filtered * @param array $config An Array of config * * @return string */ public function filter($text, $config = array()) { $context = $this->_chain->getContext(); $context->data = $text; $context->config = $config; if ($context->config->filter) { $filter = (array) KConfig::unbox($context->config->filter); $filter[] = 'ptag'; $context->config->filter = $filter; } $this->_chain->run('filter', $context); return $context->data; }
/** * Get the command chain context * * This functions inserts a 'caller' variable in the context which contains * the mixer object. * * @return KCommandContext */ public function getCommandContext() { $context = $this->_command_chain->getContext(); $context->caller = $this->_mixer; return $context; }