PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 1.10.3
Fluent Support – Helpdesk & Customer Support Ticket System v1.10.3
2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 All 68 releases
fluent-support / vendor / wpfluent / framework / src / WPFluent / Foundation / App.php

App.php in Fluent Support – Helpdesk & Customer Support Ticket System 1.10.3, at vendor/wpfluent/framework/src/WPFluent/Foundation/App.php

65 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentSupport\Framework\Foundation;
4
5
6 class App
7 {
8 /**
9 * Application instance
10 *
11 * @var FluentSupport\Framework\Foundation\Application
12 */
13 protected static $instance = null;
14
15 /**
16 * Set the application instance
17 *
18 * @param FluentSupport\Framework\Foundation\Application $app
19 */
20 public static function setInstance($app)
21 {
22 static::$instance = $app;
23 }
24
25 /**
26 * Get the application instance
27 *
28 * @param string $module The binding/key name for a component.
29 * @param array $parameters constructor dependencies if any.
30 * @return FluentSupport\Framework\Foundation\Application|mixed
31 */
32 public static function getInstance($module = null, $parameters = [])
33 {
34 if ($module) {
35 return static::$instance->make($module, $parameters);
36 }
37
38 return static::$instance;
39 }
40
41 /**
42 * Retrive a component from the container
43 *
44 * @param string $module The binding/key name for a component.
45 * @param array $parameters constructor dependencies if any.
46 * @return FluentSupport\Framework\Foundation\Application|mixed
47 */
48 public static function make($module = null, $parameters = [])
49 {
50 return static::getInstance($module, $parameters);
51 }
52
53 /**
54 * Handle dynamic method calls
55 *
56 * @param string $method
57 * @param array $params
58 * @return mixed
59 */
60 public static function __callStatic($method, $params)
61 {
62 return static::getInstance($method, ...$params);
63 }
64 }
65