Пример #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);
 }
    protected function cleanInput($input) {
        $stripperComment = new CommentStripper();
        $stripperWhiteCharacter = new WhiteCharacterStripper();

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