Example #1
0
 private static function getAuth($key = array())
 {
     $app = ServiceLocator::getConfigApp();
     //get table user
     $auth = $app['auth'];
     // print_r($auth);
     //  die();
     //create new model user use Auth
     $model = new $auth['model']();
     //reset pointer
     reset($key);
     //get fisrt key let find database
     $first_key = key($key);
     //object was return from database.
     $object = $model->forAuth($first_key, $key[$first_key], $auth['table']);
     return $object;
 }
Example #2
0
 public function __construct()
 {
     $database_provider = ServiceLocator::get('database');
     self::$DATABASE_CONNECTION = $database_provider->getConnection();
 }