/** * Loads the configuration settings for a SimpleDB connection. * * @param array $config The configuration settings, * which can take the following options: * `region` - The region. * `version` - The version of the API. * `access_key` - The access key id. * `primary_key` - The primary key (used * to identify records). * `secret_key` - The secret access key. * `signature_method` - The signature method. * `signature_version` - The AWS signature * version (currently 2). * `scheme` - The protocol (http or * https) to use when * making REST requests. * `classes` - Dependency classes. * @access public * @return void */ public function __construct(array $config = array()) { $defaults = array('region' => 'sdb.amazonaws.com', 'version' => '2009-04-15', 'access_key' => '', 'primary_key' => 'id', 'secret_key' => '', 'signature_method' => 'HmacSHA256', 'signature_version' => 2, 'scheme' => 'http', 'classes' => array('rest' => 'nx\\lib\\Rest')); parent::__construct($config + $defaults); }
public function __construct(array $config = array()) { $defaults = array('host' => '', 'username' => '', 'password' => '', 'port' => 25, 'auth' => true); parent::__construct($config + $defaults); }
/** * Loads the configuration settings for the controller. * * @param array $config The configuration options. * @access public * @return void */ public function __construct(array $config = array()) { $defaults = array('classes' => array('session' => 'app\\model\\Session', 'user' => 'app\\model\\User'), 'http_get' => $this->_http_get, 'http_post' => $this->_http_post, 'view_dir' => dirname(dirname(__DIR__)) . '/app/view/'); parent::__construct($config + $defaults); }
/** * Loads the configuration settings for Memcached. * * @param array $config The configuration settings, which * can take two options: * `host` - The hostname of * the memcached server. * `persistent_id` - A unique ID used * to allow persistence * between requests. * (By default, instances are * destroyed at the end of the request.) * @access public * @return void */ public function __construct(array $config = array()) { $defaults = array('host' => 'localhost', 'persistent_id' => ''); parent::__construct($config + $defaults); }
/** * Loads the configuration settings for a MySQL connection. * * @param array $config The configuration settings, * which can take four options: * `database` - The name of the database. * `host` - The database host. * `username` - The database username. * `password` - The database password. * (By default, instances are * destroyed at the end of the request.) * @access public * @return void */ public function __construct(array $config = array()) { $defaults = array('database' => 'journal', 'host' => 'localhost', 'username' => 'root', 'password' => 'admin'); parent::__construct($config + $defaults); }
/** * Initializes an object. Takes the following configuration options: * `id` - The primary key of an existing object, used if you * want to load an instance of an object with its * properties from the cache/database. * `where` - A WHERE clause to be used if the primary key of the * object desired is unknown. Also used if you * want to load an instance of an object with its * properties from the cache/database. * `no_cache` - Whether or not to use the cache to store/retrieve the object. * `db` - The name of the db connection to use as defined * in app/config/bootstrap/db.php. * `cache` - The name of the cache connection to use as defined * in app/config/bootstrap/cache.php. * * @see /nx/core/Model->_init() * @param array $config The configuration options. * @access public * @return void */ public function __construct(array $config = array()) { $defaults = array('id' => null, 'where' => null, 'no_cache' => false, 'db' => 'default', 'cache' => 'default'); parent::__construct($config + $defaults); }