/** * (PHP 5 >= 5.1.0)<br/> * String representation of object * * @link http://php.net/manual/en/serializable.serialize.php * @return string the string representation of the object or null */ public function serialize() { return serialize(array('id' => $this->id, 'key' => $this->key, 'name' => $this->name, 'type' => $this->type, 'quantity' => $this->quantity, 'price' => $this->price, 'tax' => $this->tax, 'tax_classes' => serialize($this->taxClasses), 'product_id' => $this->product->getId(), 'product' => $this->product->getState(), 'meta' => serialize($this->meta))); }