webCOMAND

login::__construct()

Prototype

login login::__construct(mixed $config = 'default', repository $repo = NULL, log $log = NULL)

Parameters

  • config - A string identifier or cpath, array, collection or object.
    • 'default' (default) - load the policy defined in config/io_comand_login/login.php.
    • Login Policy Identifier - load a login policy with a specific identifier
    • cPath - load a Login Policy referenced by a cPath query.
  • repo - Repository connection to use to access configuration and user information.
  • log - Optional event log to capture any login events triggered during the login process.

Example

require_once('path/to/comand.php');

$repo = \comand::repo();
$policy = $repo->log_notice("This is a notice.");
$log = new \io_comand_login\login($policy);
$log->log_notice("This is a notice.");