lithium\analysis\logger\adapter\Growl::__construct PHP Method

__construct() public method

Constructor. Growl logger constructor. Accepts an array of settings which are merged with the default settings and used to create the connection and handle notifications.
See also: lithium\analysis\Logger::write()
public __construct ( array $config = [] ) : void
$config array The settings to configure the logger. Available settings are as follows: - `'name`' _string_: The name of the application as it should appear in Growl's system settings. Defaults to the directory name containing your application. - `'host'` _string_: The Growl host with which to communicate, usually your local machine. Use this setting to send notifications to another machine on the network. Defaults to `'127.0.0.1'`. - `'port'` _integer_: Port of the host machine. Defaults to the standard Growl port, `9887`. - `'password'` _string_: Only required if the host machine requires a password. If notification or registration fails, check this against the host machine's Growl settings. - '`protocol'` _string_: Protocol to use when opening socket communication to Growl. Defaults to `'udp'`. - `'title'` _string_: The default title to display when showing Growl messages. The default value is the same as `'name'`, but can be changed on a per-message basis by specifying a `'title'` key in the `$options` parameter of `Logger::write()`. - `'notification'` _array_: A list of message types you wish to register with Growl to be able to send. Defaults to `array('Errors', 'Messages')`.
return void
    public function __construct(array $config = array())
    {
        $name = basename(Libraries::get(true, 'path'));
        $defaults = compact('name') + array('host' => '127.0.0.1', 'port' => 9887, 'password' => null, 'protocol' => 'udp', 'title' => Inflector::humanize($name), 'notifications' => array('Errors', 'Messages'), 'registered' => false);
        parent::__construct($config + $defaults);
    }