-
Notifications
You must be signed in to change notification settings - Fork 0
/
Request.php
56 lines (51 loc) · 1.41 KB
/
Request.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* Enproject Simple Framework Library
* Create Application using Enproject Simple Framework easily.
* @copyright Copyright (c) 2015 awan
* @link https://github.com/aufa
* @version 0.1.0
* @author awan <nawa@yahoo.com>
* @package aufa\enproject
* @license GPLv3+ <https://www.gnu.org/licenses/gpl-3.0.txt>
*/
namespace Aufa\Enproject;
use Aufa\Enproject\Abstracts\Singleton;
/**
* Add aliases Magic class calling instance
* Aufa\Enproject\{RequestClass} subclass of singleton
*/
class Request extends Singleton
{
/**
* Magic Method Geting properties
*
* @param string $appname property key name
* @return object Request instance if exists
*/
public function __get($appname)
{
return self::get($appname);
}
/**
* Get application instantly
*
* @param string $appname the application key name
* @return object Request instance exists
*/
public static function get($appname)
{
return Enproject::get("\\Request\\{$appname}");
}
/**
* Get application instantly
*
* @param string $appname the application key name
* @param object $object Object application
* @return object Enproject instance
*/
public static function set($appname, $object)
{
return Enproject::set("\\Request\\{$appname}", $object);
}
}