SensioLabs\Consul\Services\Session::destroy PHP Method

destroy() public method

public destroy ( $sessionId, array $options = [] )
$options array
    public function destroy($sessionId, array $options = array())
    {
        $params = array('query' => OptionsResolver::resolve($options, array('dc')));
        return $this->client->put('/v1/session/destroy/' . $sessionId, $params);
    }

Usage Example

示例#1
0
 /**
  * @param array $resources
  */
 private function releaseResources(array $resources)
 {
     foreach ($resources as $resource) {
         $this->kv->delete($this->lockPath . $resource);
     }
     $this->session->destroy($this->sessionId);
 }
All Usage Examples Of SensioLabs\Consul\Services\Session::destroy