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\Application\Console; use Pagekit\Application as Container; use P..

Decoded Output download

<?php

namespace Pagekit\Application\Console;

use Pagekit\Application as Container;
use Pagekit\Event\Event;
use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Command\Command as BaseCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class Application extends BaseApplication
{
    /**
     * The Pagekit application instance.
     *
     * @var Container
     */
    protected $container;

    /**
     * Constructor.
     *
     * @param Container $container
     * @param string $name
     */
    public function __construct(Container $container, $name = 'UNKNOWN', $version = 'UNKNOWN')
    {
        parent::__construct($name, $version);

        $this->setAutoExit(false);

        $this->container = $container;

        if (isset($container['events'])) {
            $container['events']->trigger('console.init', [$this]);
        }
    }

    public function run(InputInterface $input = null, OutputInterface $output = null)
    {
        $code = parent::run($input, $output);

        if(($code === 0) && (isset($this->container['events']))) {
            $this->container['events']->trigger(new Event('terminate'));
        }

        return $code;
    }

    /**
     * Add a command to the console.
     *
     * @param  BaseCommand $command
     * @return BaseCommand
     */
    public function add(BaseCommand $command)
    {
        if ($command instanceof Command) {
            $command->setContainer($this->container);
        }

        return parent::add($command);
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Pagekit\Application\Console;

use Pagekit\Application as Container;
use Pagekit\Event\Event;
use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Command\Command as BaseCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class Application extends BaseApplication
{
    /**
     * The Pagekit application instance.
     *
     * @var Container
     */
    protected $container;

    /**
     * Constructor.
     *
     * @param Container $container
     * @param string $name
     */
    public function __construct(Container $container, $name = 'UNKNOWN', $version = 'UNKNOWN')
    {
        parent::__construct($name, $version);

        $this->setAutoExit(false);

        $this->container = $container;

        if (isset($container['events'])) {
            $container['events']->trigger('console.init', [$this]);
        }
    }

    public function run(InputInterface $input = null, OutputInterface $output = null)
    {
        $code = parent::run($input, $output);

        if(($code === 0) && (isset($this->container['events']))) {
            $this->container['events']->trigger(new Event('terminate'));
        }

        return $code;
    }

    /**
     * Add a command to the console.
     *
     * @param  BaseCommand $command
     * @return BaseCommand
     */
    public function add(BaseCommand $command)
    {
        if ($command instanceof Command) {
            $command->setContainer($this->container);
        }

        return parent::add($command);
    }
}

Function Calls

None

Variables

None

Stats

MD5 3f21f635da0ec34eca66d66e435061d2
Eval Count 0
Decode Time 89 ms