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 Pagekit\View\Asset; use Pagekit\Application as App; class FileLocatorAs..

Decoded Output download

<?php

namespace Pagekit\View\Asset;

use Pagekit\Application as App;

class FileLocatorAsset extends FileAsset
{
    /**
     * {@inheritdoc}
     */
    public function getSource()
    {
        if (!($path = $this->getPath())) {
            return parent::getSource();
        }

        $path = App::file()->getUrl($path);

        if ($version = $this->getOption('version')) {
            $path .= (false === strpos($path, '?') ? '?' : '&') . 'v=' . $version;
        }

        return $path;
    }

    /**
     * {@inheritdoc}
     */
    public function getPath()
    {
        return App::locator()->get($this->source) ?: false;
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Pagekit\View\Asset;

use Pagekit\Application as App;

class FileLocatorAsset extends FileAsset
{
    /**
     * {@inheritdoc}
     */
    public function getSource()
    {
        if (!($path = $this->getPath())) {
            return parent::getSource();
        }

        $path = App::file()->getUrl($path);

        if ($version = $this->getOption('version')) {
            $path .= (false === strpos($path, '?') ? '?' : '&') . 'v=' . $version;
        }

        return $path;
    }

    /**
     * {@inheritdoc}
     */
    public function getPath()
    {
        return App::locator()->get($this->source) ?: false;
    }
}

Function Calls

None

Variables

None

Stats

MD5 8980694aba3982a2e5eb687ae7ea03ec
Eval Count 0
Decode Time 89 ms