src/models/DomainService.php
public function tryResourceAssignation(DomainResource $resource)
    {
        if ($type = $this->matchType($resource)) {
            $this->resources[$type] = $resource;

            return true;
        }

        return false;
    }
public function tryResourceAssignation(DomainResource $resource)
    {
        if ($type = $this->matchType($resource)) {
            $this->resources[$type] = $resource;

            return true;
        }

        return false;
    }
public function tryResourceAssignation ( DomainResource $ resource ) { if ( $ type = $ this -> matchType ( $ resource ) ) { $ this -> resources [ $ type ] = $ resource ; return true ; } return false ; }
Tries to assign a resource in this service, if the type is correct.

@param DomainResource $resource
@return bool
Tries to assign a resource in this service if the type is correct .