/** * format * @desc The standard format() method to apply formatting to the specified * column. * @param string $dataTable * @param integer $srcColumnIndices * @return void */ public function format($dataTable, $srcColumnIndices) { if (is_string($dataTable)) { $this->dataTable = $dataTable; } else { $e = new Google_Exception_Format("Expecting a parameter of type string. (transfered type: " . gettype($pattern) . ')'); $e->show(); } if (is_integer($srcColumnIndices) or is_array($srcColumnIndices)) { $this->srcColumnIndices = $srcColumnIndices; } else { $e = new Google_Exception_Format("source column is expecting a parameter of type integer or array of integers. (transfered type: " . gettype($pattern) . ')'); $e->show(); } }
/** * setProperty * @param string $name * @param mixed $val * @return void */ protected function setProperty($name, $val) { $r = new ReflectionClass(get_class($this)); $arr = $r->getStaticProperties(); if ($this->hasProperty($name, $arr["isRegistered"])) { if (!$this->properties instanceof stdClass) { $this->properties = new stdClass(); } $this->properties->{$name} = $val; } else { $e = new Google_Exception_Format("Formatter " . __CLASS__ . " does not support a property named {$name}."); echo $e->show(); } return $this; }