Ejemplo n.º 1
0
 public function convert($input)
 {
     $cleanedInput = NULL;
     if ($this->cleanInput) {
         $stripperComment = new CommentStripper();
         $stripperWhiteCharacter = new WhiteCharacterStripper();
         $cleanedInput = $stripperWhiteCharacter->convert($stripperComment->convert($input));
     }
     return json_decode(isset($cleanedInput) ? $cleanedInput : $input, $this->returnAsAssociativeArray);
 }
    public function clean($expression) {
        $stripperWhiteCharacter = new WhiteCharacterStripper();

        return $stripperWhiteCharacter->convert($expression);
    }
    protected function cleanInput($input) {
        $stripperComment = new CommentStripper();
        $stripperWhiteCharacter = new WhiteCharacterStripper();

        return $stripperWhiteCharacter->convert($stripperComment->convert($input));
    }