/**
  * Get a namespace in a given string format
  *
  * @param   string  $format   Format to return the string in
  * @param   mixed   $options  Parameters used by the formatter, see formatters for more info
  *
  * @return  string   Namespace in string format
  *
  * @since   1.0
  */
 public function toString($format = 'JSON', $options = array())
 {
     if (strtolower($format) == 'json') {
         $handler = new Json();
     } else {
         $handler = AbstractRegistryFormat::getInstance($format);
     }
     return $handler->objectToString($this->data, $options);
 }
Exemple #2
0
 /**
  * Get a namespace in a given string format
  *
  * @param   string  $format   Format to return the string in
  * @param   mixed   $options  Parameters used by the formatter, see formatters for more info
  *
  * @return  string   Namespace in string format
  *
  * @since   1.0
  */
 public function toString($format = 'JSON', $options = array())
 {
     // Return a namespace in a given format
     $handler = AbstractRegistryFormat::getInstance($format);
     return $handler->objectToString($this->data, $options);
 }