public function _closeSession($webDriver = null)
    {
        if (!$webDriver and $this->webDriver) {
            $webDriver = $this->webDriver;
        }
        if (!$webDriver) {
            return;
        }
        try {
            $webDriver->quit();
            unset($webDriver);
        } catch (UnknownServerException $e) {
            // Session already closed so nothing to do
        }
    }
public function _closeSession($webDriver = null)
    {
        if (!$webDriver and $this->webDriver) {
            $webDriver = $this->webDriver;
        }
        if (!$webDriver) {
            return;
        }
        try {
            $webDriver->quit();
            unset($webDriver);
        } catch (UnknownServerException $e) {
            // Session already closed so nothing to do
        }
    }
public function _closeSession ( $ webDriver = null ) { if ( ! $ webDriver and $ this -> webDriver ) { $ webDriver = $ this -> webDriver ; } if ( ! $ webDriver ) { return ; } try { $ webDriver -> quit ( ) ; unset ( $ webDriver ) ; } catch ( UnknownServerException $ e ) { // Session already closed so nothing to do } }
Manually closes current WebDriver session.

```php
<?php
$this->getModule('WebDriver')->_closeSession();

// close a specific session
$webDriver = $this->getModule('WebDriver')->webDriver;
$this->getModule('WebDriver')->_closeSession($webDriver);
```

@api
@param $webDriver (optional) a specific webdriver session instance
Manually closes current WebDriver session .