public function capabilities($path, $token = null)
    {
        $params = [
            'body' => json_encode(array_filter(compact('token', 'path')))
        ];

        if (empty($token)) {
            return $this->client->post('/v1/sys/capabilities-self', $params);
        }

        return $this->client->post('/v1/sys/capabilities', $params);
    }
public function capabilities($path, $token = null)
    {
        $params = [
            'body' => json_encode(array_filter(compact('token', 'path')))
        ];

        if (empty($token)) {
            return $this->client->post('/v1/sys/capabilities-self', $params);
        }

        return $this->client->post('/v1/sys/capabilities', $params);
    }
public function capabilities ( $ path , $ token = null ) { $ params = [ 'body' => json_encode ( array_filter ( compact ( 'token' , 'path' ) ) ) ] ; if ( empty ( $ token ) ) { return $ this -> client -> post ( '/v1/sys/capabilities-self' , $ params ) ; } return $ this -> client -> post ( '/v1/sys/capabilities' , $ params ) ; }
Returns the capabilities of the token on the given path.

If token is empty, 'capabilities-self' is assumed

@see    https://www.vaultproject.io/docs/http/sys-capabilities.html
@see    https://www.vaultproject.io/docs/http/sys-capabilities-self.html
@param  string      $path
@param  string|null $token
@return mixed
Returns the capabilities of the token on the given path .