original_string: public function to($type)
      {
          switch ($type) {
              case 'ini':
                  $this->string = Ini::encode($this->data);
                  break;
  
              case 'json':
                  $this->string = Json::encode($this->data, $this->prettyOutput);
                  break;
  
              case 'php':
                  $this->string = Php::encode($this->data);
                  break;
  
              case 'xml':
                  $this->string = Xml::encode($this->data, $this->prettyOutput);
                  break;
  
              case 'yml':
              case 'yaml':
                  $this->string = Yaml::encode($this->data);
                  break;
              
              default:
                  throw new \Exception("Format not supported: " . $type);
          }
  
          return $this->string;
      }
code: public function to($type)
      {
          switch ($type) {
              case 'ini':
                  $this->string = Ini::encode($this->data);
                  break;
  
              case 'json':
                  $this->string = Json::encode($this->data, $this->prettyOutput);
                  break;
  
              case 'php':
                  $this->string = Php::encode($this->data);
                  break;
  
              case 'xml':
                  $this->string = Xml::encode($this->data, $this->prettyOutput);
                  break;
  
              case 'yml':
              case 'yaml':
                  $this->string = Yaml::encode($this->data);
                  break;
              
              default:
                  throw new \Exception("Format not supported: " . $type);
          }
  
          return $this->string;
      }
code_tokens: public function to ( $ type ) { switch ( $ type ) { case 'ini' : $ this -> string = Ini :: encode ( $ this -> data ) ; break ; case 'json' : $ this -> string = Json :: encode ( $ this -> data , $ this -> prettyOutput ) ; break ; case 'php' : $ this -> string = Php :: encode ( $ this -> data ) ; break ; case 'xml' : $ this -> string = Xml :: encode ( $ this -> data , $ this -> prettyOutput ) ; break ; case 'yml' : case 'yaml' : $ this -> string = Yaml :: encode ( $ this -> data ) ; break ; default : throw new \ Exception ( "Format not supported: " . $ type ) ; } return $ this -> string ; }
docstring: Specifies the format you want to encode the data to
  @param  string $type Type [ini, json, php, xml or yaml]
  @return string
docstring_tokens: Specifies the format you want to encode the data to