public function getResourceClass()
    {
        if (!$this->_resourceClass) {
            $default = \Muffin\Webservice\Model\Resource::class;
            $self = get_called_class();
            $parts = explode('\\', $self);

            if ($self === __CLASS__ || count($parts) < 3) {
                return $this->_resourceClass = $default;
            }

            $alias = Inflector::singularize(substr(array_pop($parts), 0, -8));
            $name = implode('\\', array_slice($parts, 0, -1)) . '\Resource\\' . $alias;
            if (!class_exists($name)) {
                return $this->_resourceClass = $default;
            } else {
                return $this->_resourceClass = $name;
            }
        }

        return $this->_resourceClass;
    }
public function getResourceClass()
    {
        if (!$this->_resourceClass) {
            $default = \Muffin\Webservice\Model\Resource::class;
            $self = get_called_class();
            $parts = explode('\\', $self);

            if ($self === __CLASS__ || count($parts) < 3) {
                return $this->_resourceClass = $default;
            }

            $alias = Inflector::singularize(substr(array_pop($parts), 0, -8));
            $name = implode('\\', array_slice($parts, 0, -1)) . '\Resource\\' . $alias;
            if (!class_exists($name)) {
                return $this->_resourceClass = $default;
            } else {
                return $this->_resourceClass = $name;
            }
        }

        return $this->_resourceClass;
    }
public function getResourceClass ( ) { if ( ! $ this -> _resourceClass ) { $ default = \ Muffin \ Webservice \ Model \ Resource :: class ; $ self = get_called_class ( ) ; $ parts = explode ( '\\' , $ self ) ; if ( $ self === __CLASS__ || count ( $ parts ) < 3 ) { return $ this -> _resourceClass = $ default ; } $ alias = Inflector :: singularize ( substr ( array_pop ( $ parts ) , 0 , - 8 ) ) ; $ name = implode ( '\\' , array_slice ( $ parts , 0 , - 1 ) ) . '\Resource\\' . $ alias ; if ( ! class_exists ( $ name ) ) { return $ this -> _resourceClass = $ default ; } else { return $ this -> _resourceClass = $ name ; } } return $ this -> _resourceClass ; }
Get the resource class name used to hydrate resources for this endpoint

@return string
Get the resource class name used to hydrate resources for this endpoint