protected function bindIfNeeded(ExtensibleData $candidate) { if ($this->{$resource} === null && $this->resourceId == $candidate->getId()) { $this->resource = $candidate; } }