public function endpoint($endpoint = null)
    {
        if ($endpoint !== null) {
            $this->setName($endpoint);
        }

        return $this->getName();
    }
public function endpoint($endpoint = null)
    {
        if ($endpoint !== null) {
            $this->setName($endpoint);
        }

        return $this->getName();
    }
public function endpoint ( $ endpoint = null ) { if ( $ endpoint !== null ) { $ this -> setName ( $ endpoint ) ; } return $ this -> getName ( ) ; }
Returns the endpoint name or sets a new one

@param string|null $endpoint the new endpoint name
@return string
@deprecated 2.0.0 use setName() and getName() instead.
Returns the endpoint name or sets a new one