public function setSchema($schema)
    {
        if (is_array($schema)) {
            $schema = new Schema($this->getName(), $schema);
        }

        $this->_schema = $schema;

        return $this;
    }
public function setSchema($schema)
    {
        if (is_array($schema)) {
            $schema = new Schema($this->getName(), $schema);
        }

        $this->_schema = $schema;

        return $this;
    }
public function setSchema ( $ schema ) { if ( is_array ( $ schema ) ) { $ schema = new Schema ( $ this -> getName ( ) , $ schema ) ; } $ this -> _schema = $ schema ; return $ this ; }
Set the endpoints schema

If a \Muffin\Webservice\Schema is passed, it will be used for this endpoint
instead of the default one.

If an array is passed, a new \Muffin\Webservice\Schema will be constructed
out of it and used as the schema for this endpoint.

@param \Muffin\Webservice\Schema|array $schema Either an array of fields and config, or a schema object
@return $this
Set the endpoints schema