コード例 #1
0
 /**
  * __toString
  * @return string
  */
 public function __toString()
 {
     $string = '';
     if ($this->assigned_data instanceof Google_Data_Base) {
         $this->data = $this->assigned_data->getName();
         $string .= 'var ' . $this->data . '=' . $this->assigned_data->getData() . ";\n";
     }
     $string .= 'var ' . $this->dataTable . '=new ';
     $string .= $this->provider;
     $string .= '.';
     $string .= $this->scope;
     $string .= '.';
     $string .= $this->type;
     $string .= '(';
     if ($this->data) {
         $string .= $this->data;
     }
     if ($this->version) {
         $string .= ',' . $this->version;
     }
     $string .= ')';
     $string .= ";\n";
     if (is_array($this->properties)) {
         foreach ($this->properties as $method => $parameters) {
             foreach ($parameters as $signature) {
                 $string .= $this->dataTable . '.' . $method . '(' . (is_array($signature) ? implode(',', $signature) : $signature) . ');' . "\n";
             }
         }
     }
     $string .= "\n";
     return $string;
 }
コード例 #2
0
 /**
  * getData
  * @return string
  */
 public function getData()
 {
     /** @var $data Google_Data_Base */
     return $this->data->getData();
 }