public function getObject(array $attributes = array()) { $subtype = isset($attributes['subtype']) ? $attributes['subtype'] : 'foo_object'; return $this->entityTable->setup(null, 'object', $subtype, $attributes); }