Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.0.8.0
- * @ Author : DeZender
- * @ Release on : 25.09.2017
- * @ Official site : http://DeZender.Net
- *
- */
- namespace System;
- class Application
- {
- private $hookData = array( );
- private $loadTime = null;
- private $currentPlugin = null;
- private $managerRoute = null;
- private $functionAfterHook = array( );
- public $proxy = null;
- public function __construct()
- {
- $timer = explode( ' ', microtime( ) );
- $this->loadTime = $timer[1] + $timer[0];
- parent::__construct( );
- $this->proxy = new Proxy( );
- $this->proxy->init( $this );
- $this->add( new \Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware( ) );
- $this->pathUrl = parent::request( )->getScriptName( );
- $this->pathUrl = ((strpos( $this->pathUrl, '.php' ) === false ? $this->pathUrl : dirname( $this->pathUrl )));
- $this->fullUrl = sprintf( '%s%s%s', (stripos( $_SERVER['SERVER_PROTOCOL'], 'https' ) === true ? 'https://' : 'http://'), $_SERVER['HTTP_HOST'], $this->pathUrl );
- }
- public function isRoute($name, $whole = false)
- {
- if ($whole) {
- return ($this->request( )->getPathInfo( ) == $name ? true : false);
- }
- return (strpos( $this->request( )->getPathInfo( ), $name ) === 0 ? true : false);
- }
- public function isManager()
- {
- return $this->isRoute( MANAGER_PATH );
- }
- public function getFullUrl()
- {
- return $this->fullUrl;
- }
- public function getPathUrl($sufix = '')
- {
- return $this->pathUrl . $sufix;
- }
- public function url($sufix = '', $argument = NULL)
- {
- $sufix = str_ireplace( '/*', MANAGER_PATH, $sufix );
- $sufix = str_ireplace( '/?', '/plugin', $sufix );
- $_obfuscate_DSknExYyPCcOPicTNBwmDhk7JQ0_GyI = $this->fullUrl . $sufix;
- return (is_null( $argument ) ? $_obfuscate_DSknExYyPCcOPicTNBwmDhk7JQ0_GyI : vsprintf( $_obfuscate_DSknExYyPCcOPicTNBwmDhk7JQ0_GyI, $argument ));
- }
- public function redirect($url, $status = 302)
- {
- if ($url[0] == '/') {
- $url = $this->url( $url );
- }
- return parent::redirect( $url, $status );
- }
- public function on($route, $function, $whole = false)
- {
- $route = str_ireplace( '/*', MANAGER_PATH, $route );
- return $this->makeHook( $route, $function, $whole );
- }
- public function makeHook($route, $function, $whole = false)
- {
- if (is_array( $route )) {
- foreach ($route as $_obfuscate_DRQoNQQmBwoCPT0yEQM1Nw0wOS8EEwE => $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI) {
- $this->hookData[] = array(
- $whole,
- $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI,
- $function
- );
- }
- }
- else {
- $this->hookData[] = array(
- $whole,
- $route,
- $function
- );
- }
- }
- public function loadHook()
- {
- foreach ($this->hookData as $_obfuscate_DRQoNQQmBwoCPT0yEQM1Nw0wOS8EEwE => $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI) {
- if ($_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[0] == false) {
- if (($_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[1] == '*') || $this->isRoute( $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[1], false )) {
- $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[2]( );
- }
- }
- else {
- if (($_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[1] == '*') || $this->isRoute( $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[1], true )) {
- $_obfuscate_DQY8JQEyKDMqE1wrIwINARQhNT0VFDI[2]( );
- }
- }
- }
- }
- public function setActionAfterHook($function)
- {
- $this->functionAfterHook[] = $function;
- }
- public function fromRoute($name, $param = array( ))
- {
- $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = $this->router->getNamedRoute( $name );
- $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI->setParams( $param );
- $_obfuscate_DSokJiQkNAdcOBosBwE1GDs2LywGHRE = $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI->dispatch( );
- }
- public function getNumericVersion()
- {
- return str_ireplace( '.', '', CORE_VERSION );
- }
- public function post()
- {
- $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI = func_get_args( );
- $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = str_ireplace( '/*', MANAGER_PATH, $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI[0] );
- $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = str_ireplace( '/?', '/plugin', $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI );
- return parent::post( $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI, $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI[1] );
- }
- public function get()
- {
- $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI = func_get_args( );
- $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = str_ireplace( '/*', MANAGER_PATH, $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI[0] );
- $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = str_ireplace( '/?', '/plugin', $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI );
- return parent::get( $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI, $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI[1] );
- }
- public function put()
- {
- $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI = func_get_args( );
- $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = str_ireplace( '/*', MANAGER_PATH, $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI[0] );
- $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI = str_ireplace( '/?', '/plugin', $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI );
- return parent::put( $_obfuscate_DQElExEBGD8PLDgQGwgQNjwmIyUzEyI, $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI[1] );
- }
- public function delete()
- {
- $_obfuscate_DTdAK0A2OwsiAgpcFQ8GKgcpGjEzGzI = func_get_args( );
- ......................................................................................
- .......................................................
- ................................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement