Phalcon\Logger\Adapter\Database::__construct PHP Метод

__construct() публичный Метод

Class constructor.
public __construct ( string $name = 'phalcon', array $options = [] )
$name string
$options array
    public function __construct($name = 'phalcon', array $options = [])
    {
        if (!isset($options['db'])) {
            throw new Exception("Parameter 'db' is required");
        }
        if (!$options['db'] instanceof DbAdapterInterface) {
            throw new Exception("Parameter 'db' must be object and implement AdapterInterface");
        }
        if (!isset($options['table'])) {
            throw new Exception("Parameter 'table' is required");
        }
        $this->db = $options['db'];
        if ($name) {
            $this->name = $name;
        }
        $this->options = $options;
    }