예제 #1
0
파일: chain.php 프로젝트: stonyyi/anahita
 /**
  * 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;
 }
예제 #2
0
 /**
  * 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;
 }