public function getAssignment() { if (!$this->assignment && $this->id) { $finder = new PasApiAssignment(); $this->assignment = $finder->findByResource(static::$resource_type, $this->id, static::$model_class); } return $this->assignment; }