public function __construct($name = 'phalcon', array $options = [])
{
if (!isset($options['url'])) {
throw new Exception("Parameter 'url' is required");
}
if (!isset($options['port'])) {
throw new Exception("Parameter 'port' is required");
}
if ($name) {
$this->name = $name;
}
$this->options = $options;
register_shutdown_function([$this, 'commit']);
register_shutdown_function([$this, 'close']);
}