Beispiel #1
0
 /**
  * Applies filter chain to the $value.
  * Depending on the type of the $value, different filter handler classes are used.
  * Their apply() methods will return here to decide the handler class for the next filter in the chain
  *
  * @param $value
  * @param $filters
  * @param array $params
  *
  * @return string
  */
 public static function applyModifier($value, $filters, $params = array())
 {
     if (is_object($value)) {
         return ObjectModifier::apply($value, $filters, $params);
     } else {
         if (is_array($value)) {
             return ArrayModifier::apply($value, $filters, $params);
         } else {
             if (is_numeric($value)) {
                 return NumericModifier::apply($value, $filters, $params);
             } else {
                 return ScalarModifier::apply($value, $filters, $params);
             }
         }
     }
 }
 public function removeString($string)
 {
     $this->options = ArrayModifier::Remove($this->options, $string);
     $this->length = count($string);
 }