public function getResource($resource)
    {
        foreach ($this->getResources() as $r) {
            if ($resource === $r->getFilename()) {
                return $r;
            }
        }

        return false;
    }
public function getResource($resource)
    {
        foreach ($this->getResources() as $r) {
            if ($resource === $r->getFilename()) {
                return $r;
            }
        }

        return false;
    }
public function getResource ( $ resource ) { foreach ( $ this -> getResources ( ) as $ r ) { if ( $ resource === $ r -> getFilename ( ) ) { return $ r ; } } return false ; }
Searches the resource stack for a certain resource

@param string $resource The resource to search for

@return \M1\Vars\Resource\FileResource|bool Returns the resource if found
Searches the resource stack for a certain resource