Initial Commit
This commit is contained in:
22
dependencies/nesbot/carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.php
vendored
Normal file
22
dependencies/nesbot/carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.php
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\MessageFormatter;
|
||||
|
||||
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
|
||||
if (!\class_exists(LazyMessageFormatter::class, \false)) {
|
||||
abstract class LazyMessageFormatter implements MessageFormatterInterface
|
||||
{
|
||||
public function format(string $message, string $locale, array $parameters = []) : string
|
||||
{
|
||||
return $this->formatter->format($message, $this->transformLocale($locale), $parameters);
|
||||
}
|
||||
}
|
||||
}
|
28
dependencies/nesbot/carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php
vendored
Normal file
28
dependencies/nesbot/carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\MessageFormatter;
|
||||
|
||||
use Symfony\Component\Translation\Formatter\ChoiceMessageFormatterInterface;
|
||||
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
|
||||
if (!\class_exists(LazyMessageFormatter::class, \false)) {
|
||||
abstract class LazyMessageFormatter implements MessageFormatterInterface, ChoiceMessageFormatterInterface
|
||||
{
|
||||
protected abstract function transformLocale(?string $locale) : ?string;
|
||||
public function format($message, $locale, array $parameters = [])
|
||||
{
|
||||
return $this->formatter->format($message, $this->transformLocale($locale), $parameters);
|
||||
}
|
||||
public function choiceFormat($message, $number, $locale, array $parameters = [])
|
||||
{
|
||||
return $this->formatter->choiceFormat($message, $number, $locale, $parameters);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user