File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,49 @@ public static function isAppFramework()
3333 '\Symfony\Component\Routing\Annotation\Route ' ,
3434 ]);
3535 }
36+
37+ /**
38+ * Check if the application is running under Laravel.
39+ *
40+ * @return bool
41+ */
42+ public static function isLaravel ()
43+ {
44+ return self ::checkClassExists ('\Illuminate\Foundation\Application ' );
45+ }
46+
47+ /**
48+ * Check if the application is running under CodeIgniter.
49+ *
50+ * @return bool
51+ */
52+ public static function isCodeIgniter ()
53+ {
54+ return self ::checkClassExists ('\CI_Controller ' );
55+ }
56+
57+ /**
58+ * Check if the application is running under CakePhp.
59+ *
60+ * @return bool
61+ */
62+ public static function isCakePhp ()
63+ {
64+ return self ::checkClassExists ('\Cake\Controller\Controller ' );
65+ }
66+
67+ /**
68+ * Check if the application is running under Symfony.
69+ *
70+ * @return bool
71+ */
72+ public static function isSymfony ()
73+ {
74+ return self ::checkClassExists ([
75+ '\Symfony\Component\HttpKernel\Kernel ' ,
76+ '\Symfony\Component\Routing\Annotation\Route '
77+ ]);
78+ }
3679
3780 /**
3881 * isClosure
You can’t perform that action at this time.
0 commit comments