1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00
kanboard_ynh/sources/app/Auth/Base.php

61 lines
1.1 KiB
PHP
Raw Normal View History

2014-10-22 19:59:09 +02:00
<?php
namespace Auth;
2014-12-22 19:15:38 +01:00
use Pimple\Container;
2014-10-22 19:59:09 +02:00
/**
* Base auth class
*
* @package auth
* @author Frederic Guillot
*
2015-04-21 17:56:16 +02:00
* @property \Core\Session $session
2014-10-22 19:59:09 +02:00
* @property \Model\Acl $acl
* @property \Model\LastLogin $lastLogin
* @property \Model\User $user
2015-01-16 14:23:05 +01:00
* @property \Model\UserSession $userSession
2014-10-22 19:59:09 +02:00
*/
abstract class Base
{
/**
* Database instance
*
* @access protected
* @var \PicoDb\Database
*/
protected $db;
/**
2014-12-22 19:15:38 +01:00
* Container instance
2014-10-22 19:59:09 +02:00
*
* @access protected
2014-12-22 19:15:38 +01:00
* @var \Pimple\Container
2014-10-22 19:59:09 +02:00
*/
2014-12-22 19:15:38 +01:00
protected $container;
2014-10-22 19:59:09 +02:00
/**
* Constructor
*
* @access public
2014-12-22 19:15:38 +01:00
* @param \Pimple\Container $container
2014-10-22 19:59:09 +02:00
*/
2014-12-22 19:15:38 +01:00
public function __construct(Container $container)
2014-10-22 19:59:09 +02:00
{
2014-12-22 19:15:38 +01:00
$this->container = $container;
$this->db = $this->container['db'];
2014-10-22 19:59:09 +02:00
}
/**
* Load automatically models
*
* @access public
2014-12-22 19:15:38 +01:00
* @param string $name Model name
2014-10-22 19:59:09 +02:00
* @return mixed
*/
public function __get($name)
{
2015-01-16 14:23:05 +01:00
return $this->container[$name];
2014-10-22 19:59:09 +02:00
}
}