Advertisement
Guest User

Untitled

a guest
Apr 18th, 2021
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.57 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.0.8.0
  8. * @ Author : DeZender
  9. * @ Release on : 25.09.2017
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace System;
  15.  
  16. class Application
  17. {
  18. private $hookData = array( );
  19. private $loadTime = null;
  20. private $currentPlugin = null;
  21. private $managerRoute = null;
  22. private $functionAfterHook = array( );
  23. public $proxy = null;
  24.  
  25. public function __construct()
  26. {
  27. $timer = explode( ' ', microtime( ) );
  28. $this->loadTime = $timer[1] + $timer[0];
  29. parent::__construct( );
  30. $this->proxy = new Proxy( );
  31. $this->proxy->init( $this );
  32. $this->add( new \Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware( ) );
  33. $this->pathUrl = parent::request( )->getScriptName( );
  34. $this->pathUrl = ((strpos( $this->pathUrl, '.php' ) === false ? $this->pathUrl : dirname( $this->pathUrl )));
  35. $this->fullUrl = sprintf( '%s%s%s', (stripos( $_SERVER['SERVER_PROTOCOL'], 'https' ) === true ? 'https://' : 'http://'), $_SERVER['HTTP_HOST'], $this->pathUrl );
  36. }
  37.  
  38. public function isRoute($name, $whole = false)
  39. {
  40. if ($whole) {
  41. return ($this->request( )->getPathInfo( ) == $name ? true : false);
  42. }
  43.  
  44. return (strpos( $this->request( )->getPathInfo( ), $name ) === 0 ? true : false);
  45. }
  46.  
  47. public function isManager()
  48. {
  49. return $this->isRoute( MANAGER_PATH );
  50. }
  51.  
  52. public function getFullUrl()
  53. {
  54. return $this->fullUrl;
  55. }
  56.  
  57. public function getPathUrl($sufix = '')
  58. {
  59. return $this->pathUrl . $sufix;
  60. }
  61.  
  62. public function url($sufix = '', $argument = NULL)
  63. {
  64. $sufix = str_ireplace( '/*', MANAGER_PATH, $sufix );
  65. $sufix = str_ireplace( '/?', '/plugin', $sufix );
  66. $_obfuscate_DSknExYyPCcOPicTNBwmDhk7JQ0_GyI = $this->fullUrl . $sufix;
  67. return (is_null( $argument ) ? $_obfuscate_DSknExYyPCcOPicTNBwmDhk7JQ0_GyI : vsprintf( $_obfuscate_DSknExYyPCcOPicTNBwmDhk7JQ0_GyI, $argument ));
  68. }
  69.  
  70. public function redirect($url, $status = 302)
  71. {
  72. if ($url[0] == '/') {
  73. $url = $this->url( $url );
  74. }
  75.  
  76. return parent::redirect( $url, $status );
  77. }
  78.  
  79. public function on($route, $function, $whole = false)
  80. {
  81. $route = str_ireplace( '/*', MANAGER_PATH, $route );
  82. return $this->makeHook( $route, $function, $whole );
  83. }
  84.  
  85. public function makeHook($route, $function, $whole = false)
  86. {
  87. if (is_array( $route )) {
  88. foreach ($route as $_obfuscate_DRQoNQQmBwoCPT0yEQM1Nw0wOS8EEwE => $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI) {
  89. $this->hookData[] = array(
  90. $whole,
  91. $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI,
  92. $function
  93. );
  94. }
  95. }
  96. else {
  97. $this->hookData[] = array(
  98. $whole,
  99. $route,
  100. $function
  101. );
  102. }
  103. }
  104.  
  105. public function loadHook()
  106. {
  107. foreach ($this->hookData as $_obfuscate_DRQoNQQmBwoCPT0yEQM1Nw0wOS8EEwE => $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI) {
  108. if ($_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[0] == false) {
  109. if (($_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[1] == '*') || $this->isRoute( $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[1], false )) {
  110. $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[2]( );
  111. }
  112. }
  113. else {
  114. if (($_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[1] == '*') || $this->isRoute( $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[1], true )) {
  115. $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[2]( );
  116. }
  117. }
  118. }
  119. }
  120.  
  121. public function setActionAfterHook($function)
  122. {
  123. $this->functionAfterHook[] = $function;
  124. }
  125.  
  126. public function fromRoute($name, $param = array( ))
  127. {
  128. $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = $this->router->getNamedRoute( $name );
  129. $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI->setParams( $param );
  130. $_obfuscate_DSokJiQkNAdcOBosBwE1GDs2LywGHRE = $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI->dispatch( );
  131. }
  132.  
  133. public function getNumericVersion()
  134. {
  135. return str_ireplace( '.', '', CORE_VERSION );
  136. }
  137.  
  138. public function post()
  139. {
  140. $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI = func_get_args( );
  141. $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = str_ireplace( '/*', MANAGER_PATH, $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI[0] );
  142. $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = str_ireplace( '/?', '/plugin', $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI );
  143. return parent::post( $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI, $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI[1] );
  144. }
  145.  
  146. public function get()
  147. {
  148. $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI = func_get_args( );
  149. $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = str_ireplace( '/*', MANAGER_PATH, $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI[0] );
  150. $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = str_ireplace( '/?', '/plugin', $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI );
  151. return parent::get( $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI, $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI[1] );
  152. }
  153.  
  154. public function put()
  155. {
  156. $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI = func_get_args( );
  157. $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = str_ireplace( '/*', MANAGER_PATH, $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI[0] );
  158. $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = str_ireplace( '/?', '/plugin', $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI );
  159. return parent::put( $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI, $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI[1] );
  160. }
  161.  
  162. public function delete()
  163. {
  164. $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI = func_get_args( );
  165. ......................................................................................
  166. .......................................................
  167. ................................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement