public function __construct(\stdClass $row = null) { $this->initializeAttributes(); if ($row) { // Load the rest if (!$this->load($row)) { $msg = "Failed to load new " . get_class() . " for GUID:" . $row->guid; throw new \IOException($msg); } } }