예제 #1
0
 /**
  * @param string $connection
  * @param array $config
  */
 public function __construct($connection, $config = array())
 {
     parent::__construct($connection, $config);
     if (isset($config['bcrypt_cost'])) {
         $this->setBcryptCost($config['bcrypt_cost']);
     }
 }
예제 #2
0
 public function __construct($connection, $config = array())
 {
     parent::__construct($connection, $config);
     // Set custom User table
     $user = new User();
     $this->config['user_table'] = $user->getSource();
 }
예제 #3
0
 public function __construct(\Doctrine\ORM\EntityManager $em, $config = array())
 {
     $conn = $em->getConnection()->getWrappedConnection();
     parent::__construct($conn, $config);
     $tableName = $em->getClassMetadata('Novosga\\Model\\OAuthClient')->getTableName();
     $this->config['client_table'] = $tableName;
     $this->em = $em;
 }
예제 #4
0
파일: Pdo.php 프로젝트: humandevice/hd-api
 public function __construct($connection = null, $config = array())
 {
     if ($connection === null) {
         if (!empty($this->connection)) {
             $connection = \Yii::$app->get($this->connection);
             if (!$connection->getIsActive()) {
                 $connection->open();
             }
             $connection = $connection->pdo;
         } else {
             $connection = ['dsn' => $this->dsn, 'username' => $this->username, 'password' => $this->password];
         }
     }
     parent::__construct($connection, $config);
 }
예제 #5
0
 public function __construct($connection = null, $config = array())
 {
     if ($connection === null) {
         if ($this->connection !== null && \Yii::$app->has($this->connection)) {
             $db = \Yii::$app->get($this->connection);
             if (!$db instanceof \yii\db\Connection) {
                 throw new \yii\base\InvalidConfigException('Connection component must implement \\yii\\db\\Connection.');
             }
             if (!$db->getIsActive()) {
                 $db->open();
             }
             $connection = $db->pdo;
             $config = array_merge(array('client_table' => $db->tablePrefix . 'oauth_clients', 'access_token_table' => $db->tablePrefix . 'oauth_access_tokens', 'refresh_token_table' => $db->tablePrefix . 'oauth_refresh_tokens', 'code_table' => $db->tablePrefix . 'oauth_authorization_codes', 'user_table' => $db->tablePrefix . 'oauth_users', 'jwt_table' => $db->tablePrefix . 'oauth_jwt', 'jti_table' => $db->tablePrefix . 'oauth_jti', 'scope_table' => $db->tablePrefix . 'oauth_scopes', 'public_key_table' => $db->tablePrefix . 'oauth_public_keys'), $config);
         } else {
             $connection = ['dsn' => $this->dsn, 'username' => $this->username, 'password' => $this->password];
         }
     }
     parent::__construct($connection, $config);
 }
 public function __construct($connection, $config = array())
 {
     parent::__construct($connection, $config);
     $this->config['user_table'] = 'users';
 }
예제 #7
0
 public function __construct($connection, $config, ZfcUserStorageBridge $bridge)
 {
     parent::__construct($connection, $config);
     $this->bridge = $bridge;
 }