/** * __toString * @return string */ public function __toString() { $string = 'var formatter=new '; $string .= $this->provider; $string .= '.'; $string .= $this->scope; $string .= '.'; $string .= $this->type; $string .= '(\'' . (!empty($this->pattern) ? (string) $this->pattern : '') . '\');'; $string .= "\n"; if (empty($this->opt_dstColumnIndex)) { $string .= 'formatter.format(' . $this->dataTable . ', ' . Google_Base::toJson($this->srcColumnIndices) . ');'; } else { $string .= 'formatter.format(' . $this->dataTable . ', ' . Google_Base::toJson($this->srcColumnIndices) . ', ' . Google_Config::toJson($this->opt_dstColumnIndex) . ');'; } $string .= "\n"; return $string; }