Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Clockwork\Web\Support\Slim; use Clockwork\Clockwork; use Clockwork\DataSo..
Decoded Output download
<?php
namespace Clockwork\Web\Support\Slim;
use Clockwork\Clockwork;
use Clockwork\DataSource\PhpDataSource;
use Clockwork\DataSource\SlimDataSource;
use Clockwork\Storage\FileStorage;
use Slim\Middleware;
class ClockworkWebMiddleware extends Middleware
{
private $clockwork;
public function __construct()
{
$this->clockwork = $this->app->config('clockwork');
}
public function call()
{
$clockworkWeb = new ClockworkWeb();
$clockworkWeb->setCurrentRequestId($this->clockwork->getRequest()->id);
if ($this->app->config('debug')) {
if (preg_match('#/__clockwork/app#', $this->app->request()->getPathInfo(), $matches))
return $clockworkWeb->render();
else if (preg_match('#/__clockwork/(?<path>.+)#', $this->app->request()->getPathInfo(), $matches))
return $clockworkWeb->renderAsset($matches['path']);
$this->app->view()->set('clockwork_web', $clockworkWeb->getIframe());
}
try {
$this->next->call();
} catch (Exception $e) {
throw $e;
}
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Clockwork\Web\Support\Slim;
use Clockwork\Clockwork;
use Clockwork\DataSource\PhpDataSource;
use Clockwork\DataSource\SlimDataSource;
use Clockwork\Storage\FileStorage;
use Slim\Middleware;
class ClockworkWebMiddleware extends Middleware
{
private $clockwork;
public function __construct()
{
$this->clockwork = $this->app->config('clockwork');
}
public function call()
{
$clockworkWeb = new ClockworkWeb();
$clockworkWeb->setCurrentRequestId($this->clockwork->getRequest()->id);
if ($this->app->config('debug')) {
if (preg_match('#/__clockwork/app#', $this->app->request()->getPathInfo(), $matches))
return $clockworkWeb->render();
else if (preg_match('#/__clockwork/(?<path>.+)#', $this->app->request()->getPathInfo(), $matches))
return $clockworkWeb->renderAsset($matches['path']);
$this->app->view()->set('clockwork_web', $clockworkWeb->getIframe());
}
try {
$this->next->call();
} catch (Exception $e) {
throw $e;
}
}
}
Function Calls
None |
Stats
MD5 | 32d16c7ddfe445fe4e73d60494a2b286 |
Eval Count | 0 |
Decode Time | 101 ms |