lithium\data\Source::__construct PHP Method

__construct() public method

Constructor.
public __construct ( array $config = [] ) : void
$config array Available options are: - `'autoConnect'` _boolean_: If `true`, a connection is made on initialization. Defaults to `true`.
return void
    public function __construct(array $config = array())
    {
        $defaults = array('autoConnect' => true);
        parent::__construct($config + $defaults);
    }

Usage Example

Esempio n. 1
0
 /**
  * Constructor
  *
  * @param array $config
  */
 public function __construct(array $config = array())
 {
     $defaults = array('adapter' => null, 'persistent' => false, 'scheme' => 'http', 'host' => 'localhost', 'version' => '1.1', 'auth' => null, 'login' => '', 'password' => '', 'port' => 80, 'timeout' => 30, 'encoding' => 'UTF-8');
     $config = $config + $defaults;
     $config['username'] = $config['login'];
     parent::__construct($config);
 }
All Usage Examples Of lithium\data\Source::__construct