public function fromObject(OpenGraphAware $object) { $properties = $object->getOpenGraphData(); $this->validateProperties($properties); foreach ($properties as $property => $value) { $this->properties[$property] = $value; } }