Find or create association using resource details and lock.
public findByResource ( string $resource_type, string $resource_id, $internal_type = null ) : |
||
$resource_type | string | |
$resource_id | string | |
return |
/** * @return PasApiAssignment */ 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; }