function __construct($config) { parent::__construct($config); $this->Http =& new HttpSocket(); $this->email = $this->config['email']; $this->password = $this->config['password']; }
function __construct($config) { parent::__construct($config); $this->api_key = $this->config['api_key']; $this->username = $this->config['username']; $this->password = $this->config['password']; }
public function __construct($config = array()) { parent::__construct($config); $this->Node = ClassRegistry::init('Nodes.Node'); $this->TypeField = ClassRegistry::init('CustomFields.TypeField'); $this->columns = $this->Node->getDataSource()->columns; }
/** * Constructor */ function __construct($config = null) { $this->debug = Configure::read() > 0; $this->fullDebug = Configure::read() > 1; parent::__construct($config); $link = $this->connect(); //People Have been asking for this forever. if (isset($config['type']) && !empty($config['type'])) { switch ($config['type']) { case 'Netscape': $this->setNetscapeEnv(); break; case 'OpenLDAP': $this->setOpenLDAPEnv(); break; case 'ActiveDirectory': $this->setActiveDirectoryEnv(); break; default: $this->setNetscapeEnv(); break; } } $this->setSchemaPath(); return $link; }
function __construct($config) { parent::__construct($config); $this->Http =& new HttpSocket(); $this->username = $this->config['username']; $this->password = $this->config['password']; }
/** * Default Constructor * * @param array $config options * @access public */ function __construct($config) { //Select contacts service for login token $this->GoogleApiContacts = new GoogleApiContacts($config); $this->_schema = $this->GoogleApiContacts->getSchema(); parent::__construct($config); }
/** * Constructor * @param array $config An array defining the configuration settings */ public function __construct($config) { //Construct API version in this to go to SalesforceBaseClass! parent::__construct($config); $this->_baseConfig = $config; $this->connect(); }
public function __construct($config) { $this->indexFile = $config['indexFile']; $this->__setSources($config['source']); $this->__loadIndex(TMP . $this->indexFile); parent::__construct($config); }
public function __construct($config = array(), $autoConnect = true) { parent::__construct($config); $config['region'] = $this->region; $this->S3 = S3Client::factory($config); $this->bucketName = $config['bucket_name']; }
public function __construct($config = null) { if ($config === null) { $config = $this->config; } parent::__construct($config); }
function __construct($config) { parent::__construct($config); $this->Http =& new HttpSocket(); $this->params['login'] = $this->config['login']; $this->params['apiKey'] = $this->config['apiKey']; }
/** * Datasource constructor, creates the Configuration, Connection and DocumentManager objects * * ### You can pass the following configuration options * * - server: name of the server that will be used to connect to Mongo (default: `localhost`) * - database: name of the database to use when connecting to Mongo (default: `cake`) * - documentPaths: array containing a list of full path names where Document classes can be located (default: `App::path('Model')`) * - proxyDir: full path to the directory that will contain the generated proxy classes for each document (default: `TMP . 'cache'`) * - proxyNamespace: string representing the namespace the proxy classes will reside in (default: `Proxies`) * - hydratorDir: directory well the hydrator classes will be generated in (default: `TMP . 'cache'`) * - hydratorNamespace: string representing the namespace the hydrator classes will reside in (default: `Hydrators`) * * @param arary $config * @param boolean $autoConnect whether this object should attempt connection on creation * @throws MissingConnectionException if it was not possible to connect to MongoDB */ public function __construct($config = array(), $autoConnect = true) { $modelPaths = $this->_cleanupPaths(App::path('Model')); $this->_baseConfig = array('proxyDir' => TMP . 'cache', 'proxyNamespace' => 'Proxies', 'hydratorDir' => TMP . 'cache', 'hydratorNamespace' => 'Hydrators', 'server' => 'localhost', 'database' => 'cake', 'documentPaths' => $modelPaths, 'prefix' => null); foreach (CakePlugin::loaded() as $plugin) { $this->_baseConfig['documentPaths'] = array_merge($this->_baseConfig['documentPaths'], $this->_cleanupPaths(App::path('Model', $plugin))); } parent::__construct($config); extract($this->config, EXTR_OVERWRITE); $configuration = new Configuration(); $configuration->setProxyDir($proxyDir); $configuration->setProxyNamespace($proxyNamespace); $configuration->setHydratorDir($hydratorDir); $configuration->setHydratorNamespace($hydratorNamespace); $configuration->setDefaultDB($database); $configuration->setMetadataDriverImpl($this->_getMetadataReader($documentPaths)); if (Configure::read('debug') === 0) { $configuration->setAutoGenerateHydratorClasses(false); $configuration->setAutoGenerateProxyClasses(false); $configuration->setMetadataCacheImpl(new ApcCache()); } $this->configuration = $configuration; $this->connection = new Connection($server, array(), $configuration); $this->documentManager = DocumentManager::create($this->connection, $configuration); $this->documentManager->getEventManager()->addEventListener(array(Events::prePersist, Events::preUpdate, Events::preRemove, Events::postPersist, Events::postUpdate, Events::postRemove), $this); try { if ($autoConnect) { $this->connect(); } } catch (Exception $e) { throw new MissingConnectionException(array('class' => get_class($this))); } $this->setupLogger(); }
/** * Constructor */ function __construct($config = null) { $this->debug = Configure::read() > 0; $this->fullDebug = Configure::read() > 1; parent::__construct($config); return $this->connect(); }
public function __construct($config = null, $autoConnect = true) { parent::__construct($config); if ($autoConnect) { return $this->connect(); } }
/** * Constructor. Sets API key and throws an error if it's not defined in the * db config * * @param array $config */ public function __construct($config = array()) { parent::__construct($config); if (empty($config['api_key'])) { throw new CakeException('StripeSource: Missing api key'); } $this->Http = new HttpSocket(); }
function __construct($config = array()) { $this->conf = array_merge($this->conf, $config); $auth = "{$config['sid']}:{$config['token']}"; $twilioSocketConfig = array('persistent' => '', 'host' => 'api.twilio.com', 'protocol' => '6', 'port' => '443', 'timeout' => '30', 'request' => array('uri' => array('scheme' => 'https', 'host' => 'api.twilio.com', 'port' => '443'), 'auth' => array('method' => 'Basic', 'user' => $config['sid'], 'pass' => $config['token']))); $this->Socket = new TwilioSocket($twilioSocketConfig); parent::__construct($this->conf); }
/** * Constructer. Load the HttpSocket into the Http var. */ function __construct($config) { parent::__construct($config); $this->map = $this->_map(); App::import('HttpSocket'); $this->Http = new HttpSocket(); Configure::load('Cart.config'); }
public function __construct($config) { parent::__construct($config); $this->Http = new HttpSocket(); $client = new Google_Client(); $client->setDeveloperKey($this->config['apiKey']); $this->Youtube = new Google_YoutubeService($client); }
/** * Loads HttpSocket class * * @param array $config * @param HttpSocket $Http */ public function __construct($config, $Http = null) { parent::__construct($config); if (!$Http) { App::uses('HttpSocket', 'Network/Http'); $Http = new HttpSocket(); } $this->Http = $Http; }
function __construct() { $filename = APPD_CACHE . DS . self::DBNAME; $config = array('adapter' => 'sqlite', 'name' => $filename); parent::__construct($config); if (!file_exists($filename)) { $this->createCacheTable(); } }
function __construct($config) { $this->Http = new HttpSocket(); if (defined("OPENSSL_KEYTYPE_RSA")) { $this->_scheme = 'https://'; } $this->Oauth = new Oauth(); parent::__construct($config); }
function __construct($config, $autoConnect = true) { parent::__construct($config); $this->Http =& new HttpSocket(); if ($autoConnect) { return $this->connect(); } return true; }
/** * Constructor for DivanSource * * @param array $config Datasource configuration array * @param boolean $autoConnect True if datasource should connect on instantiation, * false otherwise. * @return boolean True on successful object instantiation & connection */ public function __construct($config = null, $autoConnect = true) { if (!isset($config['request'])) { $config['request']['uri'] = array_merge($this->_uri, $config); } parent::__construct($config); $this->fullDebug = Configure::read() > 1; return $autoConnect ? $this->connect() : true; }
/** * Loads HttpSocket class * * @param array $config * @param HttpSocket $Http */ public function __construct($config, $Http = null) { parent::__construct($config); if (!$Http) { App::import('Core', 'HttpSocket'); $Http = new HttpSocket(); } $this->Http = $Http; }
/** * Constructor * * @param string $config Configuration array * @param boolean $autoConnect Automatically connect to / open the file */ public function __construct($config = null, $autoConnect = true) { $this->debug = Configure::read('debug') > 0; $this->fullDebug = Configure::read('debug') > 1; parent::__construct($config); if ($autoConnect) { $this->connect(); } }
function __construct($config = array()) { parent::__construct(); $this->setConfig($config); $this->fullDebug = Configure::read('debug') > 1; $this->connection = new BeanstalkdSocket($this->config); $this->connected =& $this->connection->connected; $this->connect(); }
/** * Constructor. * * @param array $config Array of configuration information for the Datasource * @return bool True if connecting to the DataSource succeeds, else false * @throws RedisSourceException */ public function __construct($config = []) { parent::__construct($config); if (!$this->enabled()) { throw new RedisSourceException(__d('redis', 'Extension is not loaded.')); } $this->_connection = new Redis(); return $this->connect(); }
/** * Create our Solarium instance and handle any config tweaks. * @param array $config */ public function __construct($config) { parent::__construct($config); // set config params $this->host = $config['host']; $this->port = $config['port']; $this->path = $config['path']; // set Solarium instance $this->solr = new Solarium\Client(array('endpoint' => array('localhost' => array('host' => $this->host, 'port' => $this->port, 'path' => $this->path, 'timeout' => 15)))); }
function __construct($config = null) { if ($config != null) { parent::__construct($config); } uses('xml'); vendor('snoopy/snoopy'); $this->xml = new XML(); $this->Snoopy = new Snoopy(); }
/** * Constructor. * * @param array $config Configuration options. */ public function __construct($config) { parent::__construct($config); if (Configure::read('debug') > 0) { $this->_useLogging = true; } $this->_useDebugKit = CakePlugin::loaded('DebugKit'); $this->loadService(); $this->connect(); }