__toString(); } /** * Implements ArrayAccess * @param $offset * @return bool */ public function offsetExists($offset) { return array_key_exists($offset, $this->units); } /** * Implements ArrayAccess * @param $offset * @return mixed */ public function offsetGet($offset) { return $this->units[$offset]; } /** * Implements ArrayAccess * @param $offset * @param $value */ public function offsetSet($offset, $value) { $this->units[$offset] = $value; } /** * Implements ArrayAccess * @param $offset */ public function offsetUnset($offset) { $this->units[$offset] = null; } /** * @return mixed */ public function __toString() { return (string) $this->units[$this->unit]; } }