first commit
This commit is contained in:
30
modules/inpostshipping/vendor/symfony/translation/Formatter/ChoiceMessageFormatterInterface.php
vendored
Normal file
30
modules/inpostshipping/vendor/symfony/translation/Formatter/ChoiceMessageFormatterInterface.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Translation\Formatter;
|
||||
|
||||
/**
|
||||
* @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
|
||||
*/
|
||||
interface ChoiceMessageFormatterInterface
|
||||
{
|
||||
/**
|
||||
* Formats a localized message pattern with given arguments.
|
||||
*
|
||||
* @param string $message The message (may also be an object that can be cast to string)
|
||||
* @param int $number The number to use to find the indice of the message
|
||||
* @param string $locale The message locale
|
||||
* @param array $parameters An array of parameters for the message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function choiceFormat($message, $number, $locale, array $parameters = []);
|
||||
}
|
||||
48
modules/inpostshipping/vendor/symfony/translation/Formatter/MessageFormatter.php
vendored
Normal file
48
modules/inpostshipping/vendor/symfony/translation/Formatter/MessageFormatter.php
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Translation\Formatter;
|
||||
|
||||
use Symfony\Component\Translation\MessageSelector;
|
||||
|
||||
/**
|
||||
* @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
|
||||
*/
|
||||
class MessageFormatter implements MessageFormatterInterface, ChoiceMessageFormatterInterface
|
||||
{
|
||||
private $selector;
|
||||
|
||||
/**
|
||||
* @param MessageSelector|null $selector The message selector for pluralization
|
||||
*/
|
||||
public function __construct(MessageSelector $selector = null)
|
||||
{
|
||||
$this->selector = $selector ?: new MessageSelector();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function format($message, $locale, array $parameters = [])
|
||||
{
|
||||
return strtr($message, $parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function choiceFormat($message, $number, $locale, array $parameters = [])
|
||||
{
|
||||
$parameters = array_merge(['%count%' => $number], $parameters);
|
||||
|
||||
return $this->format($this->selector->choose($message, (int) $number, $locale), $locale, $parameters);
|
||||
}
|
||||
}
|
||||
30
modules/inpostshipping/vendor/symfony/translation/Formatter/MessageFormatterInterface.php
vendored
Normal file
30
modules/inpostshipping/vendor/symfony/translation/Formatter/MessageFormatterInterface.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Translation\Formatter;
|
||||
|
||||
/**
|
||||
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
|
||||
* @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
|
||||
*/
|
||||
interface MessageFormatterInterface
|
||||
{
|
||||
/**
|
||||
* Formats a localized message pattern with given arguments.
|
||||
*
|
||||
* @param string $message The message (may also be an object that can be cast to string)
|
||||
* @param string $locale The message locale
|
||||
* @param array $parameters An array of parameters for the message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function format($message, $locale, array $parameters = []);
|
||||
}
|
||||
11
modules/inpostshipping/vendor/symfony/translation/Formatter/index.php
vendored
Normal file
11
modules/inpostshipping/vendor/symfony/translation/Formatter/index.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
Reference in New Issue
Block a user