/** * Use the meta data of a MetaAware object. * * @param MetaAware $object */ public function fromObject(MetaAware $object) { $data = $object->getMetaData(); if (array_key_exists('title', $data)) { $this->setTitle($data['title']); } if (array_key_exists('description', $data)) { $this->setDescription($data['description']); } if (array_key_exists('keywords', $data)) { $this->setKeywords($data['keywords']); } if (array_key_exists('canonical', $data)) { $this->setCanonical($data['canonical']); } }