/** * sort * * @desc Sorts the rows, according to the specified sort columns. * The DataTable is modified by this method. See getSortedRows() for a * description of the sorting details. This method does not return the * sorted data. * @see getSortedRows * @example To sort by the third column and then by the second column, * @uses data.sort([{column: 2}, {column: 1}]); * * @param array $sortColumns * @return void */ public function sort(array $sortColumns) { $this->properties[__FUNCTION__][] = Google_Base::toJSON($sortColumns); }
/** * draw * @desc php method to simulate Google's default draw method * @param array|Google_Data_View $data * @param array $options * @return void */ public function draw($data, $options = null) { $this->options = $options; $arr = array(); if ($data instanceof Google_Data_View) { $arr[] = $data->getViewTable(); } else { $this->dataTable = $data; $arr[] = $data; } if ($options) { $_options = $options->getProperties(); if ($_options instanceof Google_Config_Default or $_options instanceof stdClass) { $arr[] = Google_Base::toJSON($_options); } else { $arr[] = $options->getProperties(); } } else { $arr[] = 'null'; } $this->properties[__FUNCTION__][] = $arr; }
/** * __toString * @desc convert an array to JSON data object * @return string */ public function __toString() { return Google_Base::toJSON($this->values); }
/** * render nested Google_Property Object to JSON * @return string */ public function __toString() { return stripslashes(Google_Base::toJSON($this->properties)); }