lib/avro/protocol.php
public function to_avro()
  {
    $avro = array("protocol" => $this->name, "namespace" => $this->namespace);
    
    if (!is_null($this->doc))
      $avro["doc"] = $this->doc;
    
    $types = array();
    $avro["types"] = $this->schemata->to_avro();
    
    $messages = array();
    foreach ($this->messages as $name => $msg)
      $messages[$name] = $msg->to_avro();
    $avro["messages"] = $messages;
    
    return $avro;
  }
public function to_avro()
  {
    $avro = array("protocol" => $this->name, "namespace" => $this->namespace);
    
    if (!is_null($this->doc))
      $avro["doc"] = $this->doc;
    
    $types = array();
    $avro["types"] = $this->schemata->to_avro();
    
    $messages = array();
    foreach ($this->messages as $name => $msg)
      $messages[$name] = $msg->to_avro();
    $avro["messages"] = $messages;
    
    return $avro;
  }
public function to_avro ( ) { $ avro = array ( "protocol" => $ this -> name , "namespace" => $ this -> namespace ) ; if ( ! is_null ( $ this -> doc ) ) $ avro [ "doc" ] = $ this -> doc ; $ types = array ( ) ; $ avro [ "types" ] = $ this -> schemata -> to_avro ( ) ; $ messages = array ( ) ; foreach ( $ this -> messages as $ name => $ msg ) $ messages [ $ name ] = $ msg -> to_avro ( ) ; $ avro [ "messages" ] = $ messages ; return $ avro ; }
Internal represention of this Avro Protocol.
@returns mixed
Internal represention of this Avro Protocol .