original_string: public function createFiltersMethods(array $names, $variable)
      {
          if($names === array())
          {
              return $variable;
          }
  
          $filter = array_shift($names);
  
          if($filter === 'raw')
          {
              $result = $this->createFiltersMethods($names, $variable);
          }
          else
          {
              $begin = '';
              $end   = '';
  
              if(function_exists($filter))
              {
                  $begin = "{$filter}(";
              }
              else
              {
                  $begin = "\$env->filter('{$filter}', ";
              }
  
              $result = $begin.$this->createFiltersMethods($names, $variable).')';
          }
  
          return $result;
      }
code: public function createFiltersMethods(array $names, $variable)
      {
          if($names === array())
          {
              return $variable;
          }
  
          $filter = array_shift($names);
  
          if($filter === 'raw')
          {
              $result = $this->createFiltersMethods($names, $variable);
          }
          else
          {
              $begin = '';
              $end   = '';
  
              if(function_exists($filter))
              {
                  $begin = "{$filter}(";
              }
              else
              {
                  $begin = "\$env->filter('{$filter}', ";
              }
  
              $result = $begin.$this->createFiltersMethods($names, $variable).')';
          }
  
          return $result;
      }
code_tokens: public function createFiltersMethods ( array $ names , $ variable ) { if ( $ names === array ( ) ) { return $ variable ; } $ filter = array_shift ( $ names ) ; if ( $ filter === 'raw' ) { $ result = $ this -> createFiltersMethods ( $ names , $ variable ) ; } else { $ begin = '' ; $ end = '' ; if ( function_exists ( $ filter ) ) { $ begin = "{$filter}(" ; } else { $ begin = "\$env->filter('{$filter}', " ; } $ result = $ begin . $ this -> createFiltersMethods ( $ names , $ variable ) . ')' ; } return $ result ; }
docstring: Creates filters methods for varible.
  
  @param  array  $names    Array of filters to apply.
  @param  string $variable Variable name for filtering.
  @return string
docstring_tokens: Creates filters methods for varible .