public function getResource($name)
    {
        foreach ($this->_resources as $resource) {
            if ($resource->getName() == $name) {
                return $resource;
            }
        }
    }
public function getResource($name)
    {
        foreach ($this->_resources as $resource) {
            if ($resource->getName() == $name) {
                return $resource;
            }
        }
    }
public function getResource ( $ name ) { foreach ( $ this -> _resources as $ resource ) { if ( $ resource -> getName ( ) == $ name ) { return $ resource ; } } }
Return the resource with name.

@param string $name The name of the resource

@return AnDomainResource
Return the resource with name .