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\Intl\Loader; use Symfony\Component\Translation\Exception\Invalid..

Decoded Output download

<?php

namespace Pagekit\Intl\Loader;

use Symfony\Component\Translation\Exception\InvalidResourceException;
use Symfony\Component\Translation\Exception\NotFoundResourceException;

/**
 * PhpFileLoader loads translations from PHP files returning an array of translations.
 *
 * @copyright Copyright (c) 2004-2014 Fabien Potencier
 */
class PhpFileLoader extends ArrayLoader
{
    /**
     * {@inheritdoc}
     */
    public function load($resource, $locale, $domain = 'messages')
    {
        if (!stream_is_local($resource)) {
            throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource));
        }

        if (!file_exists($resource)) {
            throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource));
        }

        $messages = array_filter(require $resource);

        return parent::load($messages, $locale, $domain);
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Pagekit\Intl\Loader;

use Symfony\Component\Translation\Exception\InvalidResourceException;
use Symfony\Component\Translation\Exception\NotFoundResourceException;

/**
 * PhpFileLoader loads translations from PHP files returning an array of translations.
 *
 * @copyright Copyright (c) 2004-2014 Fabien Potencier
 */
class PhpFileLoader extends ArrayLoader
{
    /**
     * {@inheritdoc}
     */
    public function load($resource, $locale, $domain = 'messages')
    {
        if (!stream_is_local($resource)) {
            throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource));
        }

        if (!file_exists($resource)) {
            throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource));
        }

        $messages = array_filter(require $resource);

        return parent::load($messages, $locale, $domain);
    }
}

Function Calls

None

Variables

None

Stats

MD5 6a91f0025c90bda895530e29f2a15e3d
Eval Count 0
Decode Time 90 ms