Example #1
0
 public function __construct($parent, $config = null, $params = null)
 {
     $this->directoryMask = 'Y/m-F';
     $this->config = !is_null($config) ? $config : getConfig()->get();
     $utilityObj = new Utility();
     $this->cx = new CloudExperience($utilityObj->decrypt($this->config->credentials->cxKey), $utilityObj->decrypt($this->config->credentials->cxSecret));
     $this->cx->setAccessToken($utilityObj->decrypt($this->config->credentials->cxToken));
     $this->parent = $parent;
 }
 public function __construct($parent, $config = null, $params = null)
 {
     $this->config = !is_null($config) ? $config : getConfig()->get();
     $this->directoryMask = 'Y_m_F';
     $utilityObj = new Utility();
     $oauth = new Dropbox_OAuth_PHP($utilityObj->decrypt($this->config->credentials->dropboxKey), $utilityObj->decrypt($this->config->credentials->dropboxSecret));
     $oauth->setToken(array('token' => $utilityObj->decrypt($this->config->credentials->dropboxToken), 'token_secret' => $utilityObj->decrypt($this->config->credentials->dropboxTokenSecret)));
     $this->dropbox = new Dropbox_API($oauth, Dropbox_API::ROOT_SANDBOX);
     $this->dropboxFolder = $this->config->dropbox->dropboxFolder;
     $this->parent = $parent;
 }
Example #3
0
 /**
  * Constructor
  *
  * @return void
  */
 public function __construct($config = null, $params = null)
 {
     $this->config = !is_null($config) ? $config : getConfig()->get();
     if (!is_null($params) && isset($params['fs'])) {
         $this->fs = $params['fs'];
     } else {
         $utilityObj = new Utility();
         $this->fs = new AmazonS3($utilityObj->decrypt($this->config->credentials->awsKey), $utilityObj->decrypt($this->config->credentials->awsSecret));
     }
     $this->bucket = $this->config->aws->s3BucketName;
 }
Example #4
0
 public function __construct($parent, $config = null, $params = null)
 {
     $this->directoryMask = 'Y-m-F';
     $this->config = !is_null($config) ? $config : getConfig()->get();
     $utilityObj = new Utility();
     // TODO encrypt
     $this->box = new Box_Rest_Client($utilityObj->decrypt($this->config->credentials->boxKey));
     $this->box->auth_token = $utilityObj->decrypt($this->config->credentials->boxToken);
     $this->boxFolderId = $this->config->box->boxFolderId;
     $this->parent = $parent;
 }
Example #5
0
 /**
  * Constructor
  *
  * @return void
  */
 public function __construct($config = null, $params = null)
 {
     $this->config = !is_null($config) ? $config : getConfig()->get();
     $utilityObj = new Utility();
     if (!is_null($params) && isset($params['db'])) {
         $this->db = $params['db'];
     } else {
         $this->db = new AmazonSDB($utilityObj->decrypt($this->config->credentials->awsKey), $utilityObj->decrypt($this->config->credentials->awsSecret));
     }
     $this->domainPhoto = $this->config->aws->simpleDbDomain;
     $this->domainAction = $this->config->aws->simpleDbDomain . 'Action';
     $this->domainActivity = $this->config->aws->simpleDbDomain . 'Activity';
     $this->domainAlbum = $this->config->aws->simpleDbDomain . 'Album';
     $this->domainCredential = $this->config->aws->simpleDbDomain . 'Credential';
     $this->domainGroup = $this->config->aws->simpleDbDomain . 'Group';
     $this->domainUser = $this->config->aws->simpleDbDomain . 'User';
     $this->domainTag = $this->config->aws->simpleDbDomain . 'Tag';
     $this->domainWebhook = $this->config->aws->simpleDbDomain . 'Webhook';
     if (isset($this->config->user)) {
         $this->owner = $this->config->user->email;
     }
 }
Example #6
0
 /**
  * Constructor
  *
  * @return void
  */
 public function __construct($config = null, $params = null)
 {
     $this->config = !is_null($config) ? $config : getConfig()->get();
     $mysql = $this->config->mysql;
     if (!is_null($params) && isset($params['db'])) {
         $this->db = $params['db'];
     } else {
         $utilityObj = new Utility();
         EpiDatabase::employ('mysql', $mysql->mySqlDb, $mysql->mySqlHost, $mysql->mySqlUser, $utilityObj->decrypt($mysql->mySqlPassword));
         $this->db = getDatabase();
     }
     foreach ($mysql as $key => $value) {
         $this->{$key} = $value;
     }
     if (isset($this->config->user)) {
         $this->owner = $this->config->user->email;
     }
 }
Example #7
0
<?php

try {
    $utilityObj = new Utility();
    $sql = <<<SQL
  CREATE DATABASE IF NOT EXISTS `{$this->mySqlDb}`
SQL;
    $pdo = new PDO(sprintf('%s:host=%s', 'mysql', $this->mySqlHost), $this->mySqlUser, $utilityObj->decrypt($this->mySqlPassword));
    $pdo->exec($sql);
    $sql = <<<SQL
  CREATE TABLE IF NOT EXISTS `{$this->mySqlTablePrefix}action` (
    `id` varchar(6) NOT NULL,
    `owner` varchar(127) NOT NULL,
    `actor` varchar(127) NOT NULL,
    `appId` varchar(255) DEFAULT NULL,
    `targetId` varchar(255) DEFAULT NULL,
    `targetType` varchar(255) DEFAULT NULL,
    `email` varchar(255) DEFAULT NULL,
    `name` varchar(255) DEFAULT NULL,
    `avatar` varchar(255) DEFAULT NULL,
    `website` varchar(255) DEFAULT NULL,
    `targetUrl` varchar(1000) DEFAULT NULL,
    `permalink` varchar(1000) DEFAULT NULL,
    `type` varchar(255) DEFAULT NULL,
    `value` varchar(255) DEFAULT NULL,
    `datePosted` varchar(255) DEFAULT NULL,
    `status` int(11) DEFAULT NULL,
    PRIMARY KEY `owner` (`owner`,`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SQL;
    mysql_base($sql);