Update core 8.3.0
This commit is contained in:
parent
da7a7918f8
commit
cd7a898e66
6144 changed files with 132297 additions and 87747 deletions
|
@ -52,7 +52,7 @@ class Plugin implements AnnotationInterface {
|
|||
* The parsed annotation as a definition.
|
||||
*/
|
||||
protected function parse(array $values) {
|
||||
$definitions = array();
|
||||
$definitions = [];
|
||||
foreach ($values as $key => $value) {
|
||||
if ($value instanceof AnnotationInterface) {
|
||||
$definitions[$key] = $value->get();
|
||||
|
|
|
@ -10,6 +10,7 @@ use Doctrine\Common\Annotations\SimpleAnnotationReader;
|
|||
use Doctrine\Common\Annotations\AnnotationRegistry;
|
||||
use Doctrine\Common\Reflection\StaticReflectionParser;
|
||||
use Drupal\Component\Plugin\Discovery\DiscoveryTrait;
|
||||
use Drupal\Component\Utility\Crypt;
|
||||
|
||||
/**
|
||||
* Defines a discovery mechanism to find annotated plugins in PSR-0 namespaces.
|
||||
|
@ -68,13 +69,13 @@ class AnnotatedClassDiscovery implements DiscoveryInterface {
|
|||
* @param string[] $annotation_namespaces
|
||||
* (optional) Additional namespaces to be scanned for annotation classes.
|
||||
*/
|
||||
function __construct($plugin_namespaces = array(), $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin', array $annotation_namespaces = []) {
|
||||
public function __construct($plugin_namespaces = [], $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin', array $annotation_namespaces = []) {
|
||||
$this->pluginNamespaces = $plugin_namespaces;
|
||||
$this->pluginDefinitionAnnotationName = $plugin_definition_annotation_name;
|
||||
$this->annotationNamespaces = $annotation_namespaces;
|
||||
|
||||
$file_cache_suffix = str_replace('\\', '_', $plugin_definition_annotation_name);
|
||||
$file_cache_suffix .= ':' . hash('crc32b', serialize($annotation_namespaces));
|
||||
$file_cache_suffix .= ':' . Crypt::hashBase64(serialize($annotation_namespaces));
|
||||
$this->fileCache = FileCacheFactory::get('annotation_discovery:' . $file_cache_suffix);
|
||||
}
|
||||
|
||||
|
@ -104,7 +105,7 @@ class AnnotatedClassDiscovery implements DiscoveryInterface {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function getDefinitions() {
|
||||
$definitions = array();
|
||||
$definitions = [];
|
||||
|
||||
$reader = $this->getAnnotationReader();
|
||||
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Component\Annotation\Plugin\Discovery;
|
||||
|
||||
use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
|
||||
use Drupal\Component\Plugin\Discovery\DiscoveryTrait;
|
||||
|
||||
/**
|
||||
* Ensures that all definitions are run through the annotation process.
|
||||
*/
|
||||
class AnnotationBridgeDecorator implements DiscoveryInterface {
|
||||
|
||||
use DiscoveryTrait;
|
||||
|
||||
/**
|
||||
* The decorated plugin discovery.
|
||||
*
|
||||
* @var \Drupal\Component\Plugin\Discovery\DiscoveryInterface
|
||||
*/
|
||||
protected $decorated;
|
||||
|
||||
/**
|
||||
* The name of the annotation that contains the plugin definition.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
protected $pluginDefinitionAnnotationName;
|
||||
|
||||
/**
|
||||
* ObjectDefinitionDiscoveryDecorator constructor.
|
||||
*
|
||||
* @param \Drupal\Component\Plugin\Discovery\DiscoveryInterface $decorated
|
||||
* The discovery object that is being decorated.
|
||||
* @param string $plugin_definition_annotation_name
|
||||
* The name of the annotation that contains the plugin definition. The class
|
||||
* corresponding to this name must implement
|
||||
* \Drupal\Component\Annotation\AnnotationInterface.
|
||||
*/
|
||||
public function __construct(DiscoveryInterface $decorated, $plugin_definition_annotation_name) {
|
||||
$this->decorated = $decorated;
|
||||
$this->pluginDefinitionAnnotationName = $plugin_definition_annotation_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getDefinitions() {
|
||||
$definitions = $this->decorated->getDefinitions();
|
||||
foreach ($definitions as $id => $definition) {
|
||||
// Annotation constructors expect an array of values. If the definition is
|
||||
// not an array, it usually means it has been processed already and can be
|
||||
// ignored.
|
||||
if (is_array($definition)) {
|
||||
$definitions[$id] = (new $this->pluginDefinitionAnnotationName($definition))->get();
|
||||
}
|
||||
}
|
||||
return $definitions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passes through all unknown calls onto the decorated object.
|
||||
*
|
||||
* @param string $method
|
||||
* The method to call on the decorated plugin discovery.
|
||||
* @param array $args
|
||||
* The arguments to send to the method.
|
||||
*
|
||||
* @return mixed
|
||||
* The method result.
|
||||
*/
|
||||
public function __call($method, $args) {
|
||||
return call_user_func_array([$this->decorated, $method], $args);
|
||||
}
|
||||
|
||||
}
|
|
@ -22,11 +22,11 @@ class PluginID extends AnnotationBase {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function get() {
|
||||
return array(
|
||||
return [
|
||||
'id' => $this->value,
|
||||
'class' => $this->class,
|
||||
'provider' => $this->provider,
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,7 +25,7 @@ class ZfExtensionManagerSfContainer implements ReaderManagerInterface, WriterMan
|
|||
*
|
||||
* @see \Drupal\Component\Bridge\ZfExtensionManagerSfContainer::canonicalizeName().
|
||||
*/
|
||||
protected $canonicalNamesReplacements = array('-' => '', '_' => '', ' ' => '', '\\' => '', '/' => '');
|
||||
protected $canonicalNamesReplacements = ['-' => '', '_' => '', ' ' => '', '\\' => '', '/' => ''];
|
||||
|
||||
/**
|
||||
* The prefix to be used when retrieving plugins from the container.
|
||||
|
@ -55,7 +55,7 @@ class ZfExtensionManagerSfContainer implements ReaderManagerInterface, WriterMan
|
|||
* The prefix to be used when retrieving plugins from the container.
|
||||
*/
|
||||
public function __construct($prefix = '') {
|
||||
return $this->prefix = $prefix;
|
||||
$this->prefix = $prefix;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -41,14 +41,14 @@ class DateTimePlus {
|
|||
/**
|
||||
* An array of possible date parts.
|
||||
*/
|
||||
protected static $dateParts = array(
|
||||
protected static $dateParts = [
|
||||
'year',
|
||||
'month',
|
||||
'day',
|
||||
'hour',
|
||||
'minute',
|
||||
'second',
|
||||
);
|
||||
];
|
||||
|
||||
/**
|
||||
* The value of the time value passed to the constructor.
|
||||
|
@ -88,7 +88,7 @@ class DateTimePlus {
|
|||
/**
|
||||
* An array of errors encountered when creating this date.
|
||||
*/
|
||||
protected $errors = array();
|
||||
protected $errors = [];
|
||||
|
||||
/**
|
||||
* The DateTime object.
|
||||
|
@ -108,7 +108,7 @@ class DateTimePlus {
|
|||
* @return static
|
||||
* A new DateTimePlus object.
|
||||
*/
|
||||
public static function createFromDateTime(\DateTime $datetime, $settings = array()) {
|
||||
public static function createFromDateTime(\DateTime $datetime, $settings = []) {
|
||||
return new static($datetime->format(static::FORMAT), $datetime->getTimezone(), $settings);
|
||||
}
|
||||
|
||||
|
@ -130,10 +130,10 @@ class DateTimePlus {
|
|||
* @return static
|
||||
* A new DateTimePlus object.
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \InvalidArgumentException
|
||||
* If the array date values or value combination is not correct.
|
||||
*/
|
||||
public static function createFromArray(array $date_parts, $timezone = NULL, $settings = array()) {
|
||||
public static function createFromArray(array $date_parts, $timezone = NULL, $settings = []) {
|
||||
$date_parts = static::prepareArray($date_parts, TRUE);
|
||||
if (static::checkArray($date_parts)) {
|
||||
// Even with validation, we can end up with a value that the
|
||||
|
@ -144,7 +144,7 @@ class DateTimePlus {
|
|||
return new static($iso_date, $timezone, $settings);
|
||||
}
|
||||
else {
|
||||
throw new \Exception('The array contains invalid values.');
|
||||
throw new \InvalidArgumentException('The array contains invalid values.');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,12 +164,12 @@ class DateTimePlus {
|
|||
* @return static
|
||||
* A new DateTimePlus object.
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \InvalidArgumentException
|
||||
* If the timestamp is not numeric.
|
||||
*/
|
||||
public static function createFromTimestamp($timestamp, $timezone = NULL, $settings = array()) {
|
||||
public static function createFromTimestamp($timestamp, $timezone = NULL, $settings = []) {
|
||||
if (!is_numeric($timestamp)) {
|
||||
throw new \Exception('The timestamp must be numeric.');
|
||||
throw new \InvalidArgumentException('The timestamp must be numeric.');
|
||||
}
|
||||
$datetime = new static('', $timezone, $settings);
|
||||
$datetime->setTimestamp($timestamp);
|
||||
|
@ -202,11 +202,12 @@ class DateTimePlus {
|
|||
* @return static
|
||||
* A new DateTimePlus object.
|
||||
*
|
||||
* @throws \Exception
|
||||
* If the a date cannot be created from the given format, or if the
|
||||
* created date does not match the input value.
|
||||
* @throws \InvalidArgumentException
|
||||
* If the a date cannot be created from the given format.
|
||||
* @throws \UnexpectedValueException
|
||||
* If the created date does not match the input value.
|
||||
*/
|
||||
public static function createFromFormat($format, $time, $timezone = NULL, $settings = array()) {
|
||||
public static function createFromFormat($format, $time, $timezone = NULL, $settings = []) {
|
||||
if (!isset($settings['validate_format'])) {
|
||||
$settings['validate_format'] = TRUE;
|
||||
}
|
||||
|
@ -218,7 +219,7 @@ class DateTimePlus {
|
|||
|
||||
$date = \DateTime::createFromFormat($format, $time, $datetimeplus->getTimezone());
|
||||
if (!$date instanceof \DateTime) {
|
||||
throw new \Exception('The date cannot be created from a format.');
|
||||
throw new \InvalidArgumentException('The date cannot be created from a format.');
|
||||
}
|
||||
else {
|
||||
// Functions that parse date is forgiving, it might create a date that
|
||||
|
@ -236,7 +237,7 @@ class DateTimePlus {
|
|||
$datetimeplus->setTimezone($date->getTimezone());
|
||||
|
||||
if ($settings['validate_format'] && $test_time != $time) {
|
||||
throw new \Exception('The created date does not match the input value.');
|
||||
throw new \UnexpectedValueException('The created date does not match the input value.');
|
||||
}
|
||||
}
|
||||
return $datetimeplus;
|
||||
|
@ -257,7 +258,7 @@ class DateTimePlus {
|
|||
* - debug: (optional) Boolean choice to leave debug values in the
|
||||
* date object for debugging purposes. Defaults to FALSE.
|
||||
*/
|
||||
public function __construct($time = 'now', $timezone = NULL, $settings = array()) {
|
||||
public function __construct($time = 'now', $timezone = NULL, $settings = []) {
|
||||
|
||||
// Unpack settings.
|
||||
$this->langcode = !empty($settings['langcode']) ? $settings['langcode'] : NULL;
|
||||
|
@ -267,10 +268,11 @@ class DateTimePlus {
|
|||
$prepared_timezone = $this->prepareTimezone($timezone);
|
||||
|
||||
try {
|
||||
$this->errors = [];
|
||||
if (!empty($prepared_time)) {
|
||||
$test = date_parse($prepared_time);
|
||||
if (!empty($test['errors'])) {
|
||||
$this->errors[] = $test['errors'];
|
||||
$this->errors = $test['errors'];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -284,7 +286,6 @@ class DateTimePlus {
|
|||
|
||||
// Clean up the error messages.
|
||||
$this->checkErrors();
|
||||
$this->errors = array_unique($this->errors);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -309,7 +310,7 @@ class DateTimePlus {
|
|||
if (!method_exists($this->dateTimeObject, $method)) {
|
||||
throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()', get_class($this), $method));
|
||||
}
|
||||
return call_user_func_array(array($this->dateTimeObject, $method), $args);
|
||||
return call_user_func_array([$this->dateTimeObject, $method], $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -345,7 +346,7 @@ class DateTimePlus {
|
|||
if (!method_exists('\DateTime', $method)) {
|
||||
throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()', get_called_class(), $method));
|
||||
}
|
||||
return call_user_func_array(array('\DateTime', $method), $args);
|
||||
return call_user_func_array(['\DateTime', $method], $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -441,7 +442,7 @@ class DateTimePlus {
|
|||
public function checkErrors() {
|
||||
$errors = \DateTime::getLastErrors();
|
||||
if (!empty($errors['errors'])) {
|
||||
$this->errors += $errors['errors'];
|
||||
$this->errors = array_merge($this->errors, $errors['errors']);
|
||||
}
|
||||
// Most warnings are messages that the date could not be parsed
|
||||
// which causes it to be altered. For validation purposes, a warning
|
||||
|
@ -450,6 +451,8 @@ class DateTimePlus {
|
|||
if (!empty($errors['warnings'])) {
|
||||
$this->errors[] = 'The date is invalid.';
|
||||
}
|
||||
|
||||
$this->errors = array_values(array_unique($this->errors));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -528,24 +531,24 @@ class DateTimePlus {
|
|||
public static function prepareArray($array, $force_valid_date = FALSE) {
|
||||
if ($force_valid_date) {
|
||||
$now = new \DateTime();
|
||||
$array += array(
|
||||
$array += [
|
||||
'year' => $now->format('Y'),
|
||||
'month' => 1,
|
||||
'day' => 1,
|
||||
'hour' => 0,
|
||||
'minute' => 0,
|
||||
'second' => 0,
|
||||
);
|
||||
];
|
||||
}
|
||||
else {
|
||||
$array += array(
|
||||
$array += [
|
||||
'year' => '',
|
||||
'month' => '',
|
||||
'day' => '',
|
||||
'hour' => '',
|
||||
'minute' => '',
|
||||
'second' => '',
|
||||
);
|
||||
];
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
@ -576,7 +579,7 @@ class DateTimePlus {
|
|||
}
|
||||
// Testing for valid time is reversed. Missing time is OK,
|
||||
// but incorrect values are not.
|
||||
foreach (array('hour', 'minute', 'second') as $key) {
|
||||
foreach (['hour', 'minute', 'second'] as $key) {
|
||||
if (array_key_exists($key, $array)) {
|
||||
$value = $array[$key];
|
||||
switch ($key) {
|
||||
|
@ -627,7 +630,7 @@ class DateTimePlus {
|
|||
* @return string
|
||||
* The formatted value of the date.
|
||||
*/
|
||||
public function format($format, $settings = array()) {
|
||||
public function format($format, $settings = []) {
|
||||
|
||||
// If there were construction errors, we can't format the date.
|
||||
if ($this->hasErrors()) {
|
||||
|
|
57
web/core/lib/Drupal/Component/Datetime/Time.php
Normal file
57
web/core/lib/Drupal/Component/Datetime/Time.php
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Component\Datetime;
|
||||
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
|
||||
/**
|
||||
* Provides a class for obtaining system time.
|
||||
*/
|
||||
class Time implements TimeInterface {
|
||||
|
||||
/**
|
||||
* The request stack.
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\RequestStack
|
||||
*/
|
||||
protected $requestStack;
|
||||
|
||||
/**
|
||||
* Constructs a Time object.
|
||||
*
|
||||
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
|
||||
* The request stack.
|
||||
*/
|
||||
public function __construct(RequestStack $request_stack) {
|
||||
$this->requestStack = $request_stack;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getRequestTime() {
|
||||
return $this->requestStack->getCurrentRequest()->server->get('REQUEST_TIME');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getRequestMicroTime() {
|
||||
return $this->requestStack->getCurrentRequest()->server->get('REQUEST_TIME_FLOAT');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCurrentTime() {
|
||||
return time();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCurrentMicroTime() {
|
||||
return microtime(TRUE);
|
||||
}
|
||||
|
||||
}
|
149
web/core/lib/Drupal/Component/Datetime/TimeInterface.php
Normal file
149
web/core/lib/Drupal/Component/Datetime/TimeInterface.php
Normal file
|
@ -0,0 +1,149 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Component\Datetime;
|
||||
|
||||
/**
|
||||
* Defines an interface for obtaining system time.
|
||||
*/
|
||||
interface TimeInterface {
|
||||
|
||||
/**
|
||||
* Returns the timestamp for the current request.
|
||||
*
|
||||
* This method should be used to obtain the current system time at the start
|
||||
* of the request. It will be the same value for the life of the request
|
||||
* (even for long execution times).
|
||||
*
|
||||
* This method can replace instances of
|
||||
* @code
|
||||
* $request_time = $_SERVER['REQUEST_TIME'];
|
||||
* $request_time = REQUEST_TIME;
|
||||
* $request_time = $requestStack->getCurrentRequest()->server->get('REQUEST_TIME');
|
||||
* $request_time = $request->server->get('REQUEST_TIME');
|
||||
* @endcode
|
||||
* and most instances of
|
||||
* @code
|
||||
* $time = time();
|
||||
* @endcode
|
||||
* with
|
||||
* @code
|
||||
* $request_time = \Drupal::time()->getRequestTime();
|
||||
* @endcode
|
||||
* or the equivalent using the injected service.
|
||||
*
|
||||
* Using the time service, rather than other methods, is especially important
|
||||
* when creating tests, which require predictable timestamps.
|
||||
*
|
||||
* @return int
|
||||
* A Unix timestamp.
|
||||
*
|
||||
* @see \Drupal\Component\Datetime\TimeInterface::getRequestMicroTime()
|
||||
* @see \Drupal\Component\Datetime\TimeInterface::getCurrentTime()
|
||||
* @see \Drupal\Component\Datetime\TimeInterface::getCurrentMicroTime()
|
||||
*/
|
||||
public function getRequestTime();
|
||||
|
||||
/**
|
||||
* Returns the timestamp for the current request with microsecond precision.
|
||||
*
|
||||
* This method should be used to obtain the current system time, with
|
||||
* microsecond precision, at the start of the request. It will be the same
|
||||
* value for the life of the request (even for long execution times).
|
||||
*
|
||||
* This method can replace instances of
|
||||
* @code
|
||||
* $request_time_float = $_SERVER['REQUEST_TIME_FLOAT'];
|
||||
* $request_time_float = $requestStack->getCurrentRequest()->server->get('REQUEST_TIME_FLOAT');
|
||||
* $request_time_float = $request->server->get('REQUEST_TIME_FLOAT');
|
||||
* @endcode
|
||||
* and many instances of
|
||||
* @code
|
||||
* $microtime = microtime();
|
||||
* $microtime = microtime(TRUE);
|
||||
* @endcode
|
||||
* with
|
||||
* @code
|
||||
* $request_time = \Drupal::time()->getRequestMicroTime();
|
||||
* @endcode
|
||||
* or the equivalent using the injected service.
|
||||
*
|
||||
* Using the time service, rather than other methods, is especially important
|
||||
* when creating tests, which require predictable timestamps.
|
||||
*
|
||||
* @return float
|
||||
* A Unix timestamp with a fractional portion.
|
||||
*
|
||||
* @see \Drupal\Component\Datetime\TimeInterface::getRequestTime()
|
||||
* @see \Drupal\Component\Datetime\TimeInterface::getCurrentTime()
|
||||
* @see \Drupal\Component\Datetime\TimeInterface::getCurrentMicroTime()
|
||||
*/
|
||||
public function getRequestMicroTime();
|
||||
|
||||
/**
|
||||
* Returns the current system time as an integer.
|
||||
*
|
||||
* This method should be used to obtain the current system time, at the time
|
||||
* the method was called.
|
||||
*
|
||||
* This method can replace many instances of
|
||||
* @code
|
||||
* $time = time();
|
||||
* @endcode
|
||||
* with
|
||||
* @code
|
||||
* $request_time = \Drupal::time()->getCurrentTime();
|
||||
* @endcode
|
||||
* or the equivalent using the injected service.
|
||||
*
|
||||
* This method should only be used when the current system time is actually
|
||||
* needed, such as with timers or time interval calculations. If only the
|
||||
* time at the start of the request is needed,
|
||||
* use TimeInterface::getRequestTime().
|
||||
*
|
||||
* Using the time service, rather than other methods, is especially important
|
||||
* when creating tests, which require predictable timestamps.
|
||||
*
|
||||
* @return int
|
||||
* A Unix timestamp.
|
||||
*
|
||||
* @see \Drupal\Component\Datetime\TimeInterface::getRequestTime()
|
||||
* @see \Drupal\Component\Datetime\TimeInterface::getRequestMicroTime()
|
||||
* @see \Drupal\Component\Datetime\TimeInterface::getCurrentMicroTime()
|
||||
*/
|
||||
public function getCurrentTime();
|
||||
|
||||
/**
|
||||
* Returns the current system time with microsecond precision.
|
||||
*
|
||||
* This method should be used to obtain the current system time, with
|
||||
* microsecond precision, at the time the method was called.
|
||||
*
|
||||
* This method can replace many instances of
|
||||
* @code
|
||||
* $microtime = microtime();
|
||||
* $microtime = microtime(TRUE);
|
||||
* @endcode
|
||||
* with
|
||||
* @code
|
||||
* $request_time = \Drupal::time()->getCurrentMicroTime();
|
||||
* @endcode
|
||||
* or the equivalent using the injected service.
|
||||
*
|
||||
* This method should only be used when the current system time is actually
|
||||
* needed, such as with timers or time interval calculations. If only the
|
||||
* time at the start of the request and microsecond precision is needed,
|
||||
* use TimeInterface::getRequestMicroTime().
|
||||
*
|
||||
* Using the time service, rather than other methods, is especially important
|
||||
* when creating tests, which require predictable timestamps.
|
||||
*
|
||||
* @return float
|
||||
* A Unix timestamp with a fractional portion.
|
||||
*
|
||||
* @see \Drupal\Component\Datetime\TimeInterface::getRequestTime()
|
||||
* @see \Drupal\Component\Datetime\TimeInterface::getRequestMicroTime()
|
||||
* @see \Drupal\Component\Datetime\TimeInterface::getCurrentTime()
|
||||
*/
|
||||
public function getCurrentMicroTime();
|
||||
|
||||
}
|
|
@ -57,42 +57,42 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $parameters = array();
|
||||
protected $parameters = [];
|
||||
|
||||
/**
|
||||
* The aliases of the container.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $aliases = array();
|
||||
protected $aliases = [];
|
||||
|
||||
/**
|
||||
* The service definitions of the container.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $serviceDefinitions = array();
|
||||
protected $serviceDefinitions = [];
|
||||
|
||||
/**
|
||||
* The instantiated services.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $services = array();
|
||||
protected $services = [];
|
||||
|
||||
/**
|
||||
* The instantiated private services.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $privateServices = array();
|
||||
protected $privateServices = [];
|
||||
|
||||
/**
|
||||
* The currently loading services.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $loading = array();
|
||||
protected $loading = [];
|
||||
|
||||
/**
|
||||
* Whether the container parameters can still be changed.
|
||||
|
@ -116,14 +116,14 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
|
|||
* - machine_format: Whether this container definition uses the optimized
|
||||
* machine-readable container format.
|
||||
*/
|
||||
public function __construct(array $container_definition = array()) {
|
||||
public function __construct(array $container_definition = []) {
|
||||
if (!empty($container_definition) && (!isset($container_definition['machine_format']) || $container_definition['machine_format'] !== TRUE)) {
|
||||
throw new InvalidArgumentException('The non-optimized format is not supported by this class. Use an optimized machine-readable format instead, e.g. as produced by \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper.');
|
||||
}
|
||||
|
||||
$this->aliases = isset($container_definition['aliases']) ? $container_definition['aliases'] : array();
|
||||
$this->parameters = isset($container_definition['parameters']) ? $container_definition['parameters'] : array();
|
||||
$this->serviceDefinitions = isset($container_definition['services']) ? $container_definition['services'] : array();
|
||||
$this->aliases = isset($container_definition['aliases']) ? $container_definition['aliases'] : [];
|
||||
$this->parameters = isset($container_definition['parameters']) ? $container_definition['parameters'] : [];
|
||||
$this->serviceDefinitions = isset($container_definition['services']) ? $container_definition['services'] : [];
|
||||
$this->frozen = isset($container_definition['frozen']) ? $container_definition['frozen'] : FALSE;
|
||||
|
||||
// Register the service_container with itself.
|
||||
|
@ -228,7 +228,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
|
|||
throw new RuntimeException(sprintf('You have requested a synthetic service ("%s"). The service container does not know how to construct this service. The service will need to be set before it is first used.', $id));
|
||||
}
|
||||
|
||||
$arguments = array();
|
||||
$arguments = [];
|
||||
if (isset($definition['arguments'])) {
|
||||
$arguments = $definition['arguments'];
|
||||
|
||||
|
@ -238,14 +238,14 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
|
|||
}
|
||||
|
||||
if (isset($definition['file'])) {
|
||||
$file = $this->frozen ? $definition['file'] : current($this->resolveServicesAndParameters(array($definition['file'])));
|
||||
$file = $this->frozen ? $definition['file'] : current($this->resolveServicesAndParameters([$definition['file']]));
|
||||
require_once $file;
|
||||
}
|
||||
|
||||
if (isset($definition['factory'])) {
|
||||
$factory = $definition['factory'];
|
||||
if (is_array($factory)) {
|
||||
$factory = $this->resolveServicesAndParameters(array($factory[0], $factory[1]));
|
||||
$factory = $this->resolveServicesAndParameters([$factory[0], $factory[1]]);
|
||||
}
|
||||
elseif (!is_string($factory)) {
|
||||
throw new RuntimeException(sprintf('Cannot create service "%s" because of invalid factory', $id));
|
||||
|
@ -254,7 +254,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
|
|||
$service = call_user_func_array($factory, $arguments);
|
||||
}
|
||||
else {
|
||||
$class = $this->frozen ? $definition['class'] : current($this->resolveServicesAndParameters(array($definition['class'])));
|
||||
$class = $this->frozen ? $definition['class'] : current($this->resolveServicesAndParameters([$definition['class']]));
|
||||
$length = isset($definition['arguments_count']) ? $definition['arguments_count'] : count($arguments);
|
||||
|
||||
// Optimize class instantiation for services with up to 10 parameters as
|
||||
|
@ -322,14 +322,14 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
|
|||
if (isset($definition['calls'])) {
|
||||
foreach ($definition['calls'] as $call) {
|
||||
$method = $call[0];
|
||||
$arguments = array();
|
||||
$arguments = [];
|
||||
if (!empty($call[1])) {
|
||||
$arguments = $call[1];
|
||||
if ($arguments instanceof \stdClass) {
|
||||
$arguments = $this->resolveServicesAndParameters($arguments);
|
||||
}
|
||||
}
|
||||
call_user_func_array(array($service, $method), $arguments);
|
||||
call_user_func_array([$service, $method], $arguments);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -362,7 +362,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function set($id, $service, $scope = ContainerInterface::SCOPE_CONTAINER) {
|
||||
if (!in_array($scope, array('container', 'request')) || ('request' === $scope && 'request' !== $id)) {
|
||||
if (!in_array($scope, ['container', 'request']) || ('request' === $scope && 'request' !== $id)) {
|
||||
@trigger_error('The concept of container scopes is deprecated since version 2.8 and will be removed in 3.0. Omit the third parameter.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
|
@ -549,7 +549,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
|
|||
* An array of strings with suitable alternatives.
|
||||
*/
|
||||
protected function getAlternatives($search_key, array $keys) {
|
||||
$alternatives = array();
|
||||
$alternatives = [];
|
||||
foreach ($keys as $key) {
|
||||
$lev = levenshtein($search_key, $key);
|
||||
if ($lev <= strlen($search_key) / 3 || strpos($key, $search_key) !== FALSE) {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Drupal\Component\DependencyInjection\Dumper;
|
||||
|
||||
use Drupal\Component\Utility\Crypt;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
use Symfony\Component\DependencyInjection\Parameter;
|
||||
|
@ -48,7 +49,7 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function dump(array $options = array()) {
|
||||
public function dump(array $options = []) {
|
||||
return serialize($this->getArray());
|
||||
}
|
||||
|
||||
|
@ -59,7 +60,7 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
* A PHP array representation of the service container.
|
||||
*/
|
||||
public function getArray() {
|
||||
$definition = array();
|
||||
$definition = [];
|
||||
$this->aliases = $this->getAliases();
|
||||
$definition['aliases'] = $this->getAliases();
|
||||
$definition['parameters'] = $this->getParameters();
|
||||
|
@ -76,7 +77,7 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
* The aliases.
|
||||
*/
|
||||
protected function getAliases() {
|
||||
$alias_definitions = array();
|
||||
$alias_definitions = [];
|
||||
|
||||
$aliases = $this->container->getAliases();
|
||||
foreach ($aliases as $alias => $id) {
|
||||
|
@ -98,7 +99,7 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
*/
|
||||
protected function getParameters() {
|
||||
if (!$this->container->getParameterBag()->all()) {
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
|
||||
$parameters = $this->container->getParameterBag()->all();
|
||||
|
@ -114,10 +115,10 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
*/
|
||||
protected function getServiceDefinitions() {
|
||||
if (!$this->container->getDefinitions()) {
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
|
||||
$services = array();
|
||||
$services = [];
|
||||
foreach ($this->container->getDefinitions() as $id => $definition) {
|
||||
// Only store public service definitions, references to shared private
|
||||
// services are handled in ::getReferenceCall().
|
||||
|
@ -142,7 +143,7 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
* An array of prepared parameters.
|
||||
*/
|
||||
protected function prepareParameters(array $parameters, $escape = TRUE) {
|
||||
$filtered = array();
|
||||
$filtered = [];
|
||||
foreach ($parameters as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
$value = $this->prepareParameters($value, $escape);
|
||||
|
@ -167,7 +168,7 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
* The escaped parameters.
|
||||
*/
|
||||
protected function escape(array $parameters) {
|
||||
$args = array();
|
||||
$args = [];
|
||||
|
||||
foreach ($parameters as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
|
@ -198,7 +199,7 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
* scope different from SCOPE_CONTAINER and SCOPE_PROTOTYPE.
|
||||
*/
|
||||
protected function getServiceDefinition(Definition $definition) {
|
||||
$service = array();
|
||||
$service = [];
|
||||
if ($definition->getClass()) {
|
||||
$service['class'] = $definition->getClass();
|
||||
}
|
||||
|
@ -278,11 +279,11 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
* The PHP array representation of the method calls.
|
||||
*/
|
||||
protected function dumpMethodCalls(array $calls) {
|
||||
$code = array();
|
||||
$code = [];
|
||||
|
||||
foreach ($calls as $key => $call) {
|
||||
$method = $call[0];
|
||||
$arguments = array();
|
||||
$arguments = [];
|
||||
if (!empty($call[1])) {
|
||||
$arguments = $this->dumpCollection($call[1]);
|
||||
}
|
||||
|
@ -308,7 +309,7 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
* The collection in a suitable format.
|
||||
*/
|
||||
protected function dumpCollection($collection, &$resolve = FALSE) {
|
||||
$code = array();
|
||||
$code = [];
|
||||
|
||||
foreach ($collection as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
|
@ -331,11 +332,11 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
return $collection;
|
||||
}
|
||||
|
||||
return (object) array(
|
||||
return (object) [
|
||||
'type' => 'collection',
|
||||
'value' => $code,
|
||||
'resolve' => $resolve,
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -350,7 +351,7 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
protected function dumpCallable($callable) {
|
||||
if (is_array($callable)) {
|
||||
$callable[0] = $this->dumpValue($callable[0]);
|
||||
$callable = array($callable[0], $callable[1]);
|
||||
$callable = [$callable[0], $callable[1]];
|
||||
}
|
||||
|
||||
return $callable;
|
||||
|
@ -373,15 +374,15 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
protected function getPrivateServiceCall($id, Definition $definition, $shared = FALSE) {
|
||||
$service_definition = $this->getServiceDefinition($definition);
|
||||
if (!$id) {
|
||||
$hash = hash('sha1', serialize($service_definition));
|
||||
$hash = Crypt::hashBase64(serialize($service_definition));
|
||||
$id = 'private__' . $hash;
|
||||
}
|
||||
return (object) array(
|
||||
return (object) [
|
||||
'type' => 'private_service',
|
||||
'id' => $id,
|
||||
'value' => $service_definition,
|
||||
'shared' => $shared,
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -398,7 +399,7 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
*/
|
||||
protected function dumpValue($value) {
|
||||
if (is_array($value)) {
|
||||
$code = array();
|
||||
$code = [];
|
||||
foreach ($value as $k => $v) {
|
||||
$code[$k] = $this->dumpValue($v);
|
||||
}
|
||||
|
@ -481,11 +482,11 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
* A suitable representation of the service reference.
|
||||
*/
|
||||
protected function getServiceCall($id, $invalid_behavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
|
||||
return (object) array(
|
||||
return (object) [
|
||||
'type' => 'service',
|
||||
'id' => $id,
|
||||
'invalidBehavior' => $invalid_behavior,
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -498,10 +499,10 @@ class OptimizedPhpArrayDumper extends Dumper {
|
|||
* A suitable representation of the parameter reference.
|
||||
*/
|
||||
protected function getParameterCall($name) {
|
||||
return (object) array(
|
||||
return (object) [
|
||||
'type' => 'parameter',
|
||||
'name' => $name,
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,7 +30,7 @@ class PhpArrayDumper extends OptimizedPhpArrayDumper {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
protected function dumpCollection($collection, &$resolve = FALSE) {
|
||||
$code = array();
|
||||
$code = [];
|
||||
|
||||
foreach ($collection as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
|
|
|
@ -27,16 +27,16 @@ class PhpArrayContainer extends Container {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __construct(array $container_definition = array()) {
|
||||
public function __construct(array $container_definition = []) {
|
||||
if (isset($container_definition['machine_format']) && $container_definition['machine_format'] === TRUE) {
|
||||
throw new InvalidArgumentException('The machine-optimized format is not supported by this class. Use a human-readable format instead, e.g. as produced by \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper.');
|
||||
}
|
||||
|
||||
// Do not call the parent's constructor as it would bail on the
|
||||
// machine-optimized format.
|
||||
$this->aliases = isset($container_definition['aliases']) ? $container_definition['aliases'] : array();
|
||||
$this->parameters = isset($container_definition['parameters']) ? $container_definition['parameters'] : array();
|
||||
$this->serviceDefinitions = isset($container_definition['services']) ? $container_definition['services'] : array();
|
||||
$this->aliases = isset($container_definition['aliases']) ? $container_definition['aliases'] : [];
|
||||
$this->parameters = isset($container_definition['parameters']) ? $container_definition['parameters'] : [];
|
||||
$this->serviceDefinitions = isset($container_definition['services']) ? $container_definition['services'] : [];
|
||||
$this->frozen = isset($container_definition['frozen']) ? $container_definition['frozen'] : FALSE;
|
||||
|
||||
// Register the service_container with itself.
|
||||
|
@ -57,20 +57,20 @@ class PhpArrayContainer extends Container {
|
|||
throw new RuntimeException(sprintf('You have requested a synthetic service ("%s"). The service container does not know how to construct this service. The service will need to be set before it is first used.', $id));
|
||||
}
|
||||
|
||||
$arguments = array();
|
||||
$arguments = [];
|
||||
if (isset($definition['arguments'])) {
|
||||
$arguments = $this->resolveServicesAndParameters($definition['arguments']);
|
||||
}
|
||||
|
||||
if (isset($definition['file'])) {
|
||||
$file = $this->frozen ? $definition['file'] : current($this->resolveServicesAndParameters(array($definition['file'])));
|
||||
$file = $this->frozen ? $definition['file'] : current($this->resolveServicesAndParameters([$definition['file']]));
|
||||
require_once $file;
|
||||
}
|
||||
|
||||
if (isset($definition['factory'])) {
|
||||
$factory = $definition['factory'];
|
||||
if (is_array($factory)) {
|
||||
$factory = $this->resolveServicesAndParameters(array($factory[0], $factory[1]));
|
||||
$factory = $this->resolveServicesAndParameters([$factory[0], $factory[1]]);
|
||||
}
|
||||
elseif (!is_string($factory)) {
|
||||
throw new RuntimeException(sprintf('Cannot create service "%s" because of invalid factory', $id));
|
||||
|
@ -79,7 +79,7 @@ class PhpArrayContainer extends Container {
|
|||
$service = call_user_func_array($factory, $arguments);
|
||||
}
|
||||
else {
|
||||
$class = $this->frozen ? $definition['class'] : current($this->resolveServicesAndParameters(array($definition['class'])));
|
||||
$class = $this->frozen ? $definition['class'] : current($this->resolveServicesAndParameters([$definition['class']]));
|
||||
$length = isset($definition['arguments_count']) ? $definition['arguments_count'] : count($arguments);
|
||||
|
||||
// Optimize class instantiation for services with up to 10 parameters as
|
||||
|
@ -147,12 +147,12 @@ class PhpArrayContainer extends Container {
|
|||
if (isset($definition['calls'])) {
|
||||
foreach ($definition['calls'] as $call) {
|
||||
$method = $call[0];
|
||||
$arguments = array();
|
||||
$arguments = [];
|
||||
if (!empty($call[1])) {
|
||||
$arguments = $call[1];
|
||||
$arguments = $this->resolveServicesAndParameters($arguments);
|
||||
}
|
||||
call_user_func_array(array($service, $method), $arguments);
|
||||
call_user_func_array([$service, $method], $arguments);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class Diff {
|
|||
*/
|
||||
public function reverse() {
|
||||
$rev = $this;
|
||||
$rev->edits = array();
|
||||
$rev->edits = [];
|
||||
foreach ($this->edits as $edit) {
|
||||
$rev->edits[] = $edit->reverse();
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ class Diff {
|
|||
* @return array The original sequence of strings.
|
||||
*/
|
||||
public function orig() {
|
||||
$lines = array();
|
||||
$lines = [];
|
||||
|
||||
foreach ($this->edits as $edit) {
|
||||
if ($edit->orig) {
|
||||
|
@ -115,7 +115,7 @@ class Diff {
|
|||
* @return array The sequence of strings.
|
||||
*/
|
||||
public function closing() {
|
||||
$lines = array();
|
||||
$lines = [];
|
||||
|
||||
foreach ($this->edits as $edit) {
|
||||
if ($edit->closing) {
|
||||
|
|
|
@ -41,10 +41,10 @@ class DiffFormatter {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $line_stats = array(
|
||||
'counter' => array('x' => 0, 'y' => 0),
|
||||
'offset' => array('x' => 0, 'y' => 0),
|
||||
);
|
||||
protected $line_stats = [
|
||||
'counter' => ['x' => 0, 'y' => 0],
|
||||
'offset' => ['x' => 0, 'y' => 0],
|
||||
];
|
||||
|
||||
/**
|
||||
* Format a diff.
|
||||
|
@ -58,7 +58,7 @@ class DiffFormatter {
|
|||
public function format(Diff $diff) {
|
||||
$xi = $yi = 1;
|
||||
$block = FALSE;
|
||||
$context = array();
|
||||
$context = [];
|
||||
|
||||
$nlead = $this->leading_context_lines;
|
||||
$ntrail = $this->trailing_context_lines;
|
||||
|
@ -87,7 +87,7 @@ class DiffFormatter {
|
|||
$context = array_slice($context, sizeof($context) - $nlead);
|
||||
$x0 = $xi - sizeof($context);
|
||||
$y0 = $yi - sizeof($context);
|
||||
$block = array();
|
||||
$block = [];
|
||||
if ($context) {
|
||||
$block[] = new DiffOpCopy($context);
|
||||
}
|
||||
|
|
|
@ -38,9 +38,9 @@ class DiffEngine {
|
|||
$n_from = sizeof($from_lines);
|
||||
$n_to = sizeof($to_lines);
|
||||
|
||||
$this->xchanged = $this->ychanged = array();
|
||||
$this->xv = $this->yv = array();
|
||||
$this->xind = $this->yind = array();
|
||||
$this->xchanged = $this->ychanged = [];
|
||||
$this->xv = $this->yv = [];
|
||||
$this->xind = $this->yind = [];
|
||||
unset($this->seq);
|
||||
unset($this->in_seq);
|
||||
unset($this->lcs);
|
||||
|
@ -93,14 +93,14 @@ class DiffEngine {
|
|||
$this->_shift_boundaries($to_lines, $this->ychanged, $this->xchanged);
|
||||
|
||||
// Compute the edit operations.
|
||||
$edits = array();
|
||||
$edits = [];
|
||||
$xi = $yi = 0;
|
||||
while ($xi < $n_from || $yi < $n_to) {
|
||||
$this::USE_ASSERTS && assert($yi < $n_to || $this->xchanged[$xi]);
|
||||
$this::USE_ASSERTS && assert($xi < $n_from || $this->ychanged[$yi]);
|
||||
|
||||
// Skip matching "snake".
|
||||
$copy = array();
|
||||
$copy = [];
|
||||
while ( $xi < $n_from && $yi < $n_to && !$this->xchanged[$xi] && !$this->ychanged[$yi]) {
|
||||
$copy[] = $from_lines[$xi++];
|
||||
++$yi;
|
||||
|
@ -109,11 +109,11 @@ class DiffEngine {
|
|||
$edits[] = new DiffOpCopy($copy);
|
||||
}
|
||||
// Find deletes & adds.
|
||||
$delete = array();
|
||||
$delete = [];
|
||||
while ($xi < $n_from && $this->xchanged[$xi]) {
|
||||
$delete[] = $from_lines[$xi++];
|
||||
}
|
||||
$add = array();
|
||||
$add = [];
|
||||
while ($yi < $n_to && $this->ychanged[$yi]) {
|
||||
$add[] = $to_lines[$yi++];
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ class DiffEngine {
|
|||
// Things seems faster (I'm not sure I understand why)
|
||||
// when the shortest sequence in X.
|
||||
$flip = TRUE;
|
||||
list($xoff, $xlim, $yoff, $ylim) = array($yoff, $ylim, $xoff, $xlim);
|
||||
list($xoff, $xlim, $yoff, $ylim) = [$yoff, $ylim, $xoff, $xlim];
|
||||
}
|
||||
|
||||
if ($flip) {
|
||||
|
@ -182,8 +182,8 @@ class DiffEngine {
|
|||
}
|
||||
$this->lcs = 0;
|
||||
$this->seq[0] = $yoff - 1;
|
||||
$this->in_seq = array();
|
||||
$ymids[0] = array();
|
||||
$this->in_seq = [];
|
||||
$ymids[0] = [];
|
||||
|
||||
$numer = $xlim - $xoff + $nchunks - 1;
|
||||
$x = $xoff;
|
||||
|
@ -228,16 +228,16 @@ class DiffEngine {
|
|||
}
|
||||
}
|
||||
|
||||
$seps[] = $flip ? array($yoff, $xoff) : array($xoff, $yoff);
|
||||
$seps[] = $flip ? [$yoff, $xoff] : [$xoff, $yoff];
|
||||
$ymid = $ymids[$this->lcs];
|
||||
for ($n = 0; $n < $nchunks - 1; $n++) {
|
||||
$x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $n) / $nchunks);
|
||||
$y1 = $ymid[$n] + 1;
|
||||
$seps[] = $flip ? array($y1, $x1) : array($x1, $y1);
|
||||
$seps[] = $flip ? [$y1, $x1] : [$x1, $y1];
|
||||
}
|
||||
$seps[] = $flip ? array($ylim, $xlim) : array($xlim, $ylim);
|
||||
$seps[] = $flip ? [$ylim, $xlim] : [$xlim, $ylim];
|
||||
|
||||
return array($this->lcs, $seps);
|
||||
return [$this->lcs, $seps];
|
||||
}
|
||||
|
||||
protected function _lcs_pos($ypos) {
|
||||
|
|
|
@ -20,7 +20,7 @@ class HWLDFWordAccumulator {
|
|||
*/
|
||||
const NBSP = ' ';
|
||||
|
||||
protected $lines = array();
|
||||
protected $lines = [];
|
||||
|
||||
protected $line = '';
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ class WordLevelDiff extends MappedDiff {
|
|||
}
|
||||
|
||||
protected function _split($lines) {
|
||||
$words = array();
|
||||
$stripped = array();
|
||||
$words = [];
|
||||
$stripped = [];
|
||||
$first = TRUE;
|
||||
foreach ($lines as $line) {
|
||||
// If the line is too long, just pretend the entire line is one big word
|
||||
|
@ -46,7 +46,7 @@ class WordLevelDiff extends MappedDiff {
|
|||
}
|
||||
}
|
||||
}
|
||||
return array($words, $stripped);
|
||||
return [$words, $stripped];
|
||||
}
|
||||
|
||||
public function orig() {
|
||||
|
|
|
@ -65,7 +65,7 @@ class YamlDirectoryDiscovery implements DiscoverableInterface {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function findAll() {
|
||||
$all = array();
|
||||
$all = [];
|
||||
|
||||
$files = $this->findFiles();
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ class YamlDiscovery implements DiscoverableInterface {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $directories = array();
|
||||
protected $directories = [];
|
||||
|
||||
/**
|
||||
* Constructs a YamlDiscovery object.
|
||||
|
@ -42,7 +42,7 @@ class YamlDiscovery implements DiscoverableInterface {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function findAll() {
|
||||
$all = array();
|
||||
$all = [];
|
||||
|
||||
$files = $this->findFiles();
|
||||
$provider_by_files = array_flip($files);
|
||||
|
@ -86,7 +86,7 @@ class YamlDiscovery implements DiscoverableInterface {
|
|||
* @return array
|
||||
*/
|
||||
protected function findFiles() {
|
||||
$files = array();
|
||||
$files = [];
|
||||
foreach ($this->directories as $provider => $directory) {
|
||||
$file = $directory . '/' . $provider . '.' . $this->name . '.yml';
|
||||
if (file_exists($file)) {
|
||||
|
|
|
@ -230,14 +230,14 @@ class ContainerAwareEventDispatcher implements EventDispatcherInterface {
|
|||
public function addSubscriber(EventSubscriberInterface $subscriber) {
|
||||
foreach ($subscriber->getSubscribedEvents() as $event_name => $params) {
|
||||
if (is_string($params)) {
|
||||
$this->addListener($event_name, array($subscriber, $params));
|
||||
$this->addListener($event_name, [$subscriber, $params]);
|
||||
}
|
||||
elseif (is_string($params[0])) {
|
||||
$this->addListener($event_name, array($subscriber, $params[0]), isset($params[1]) ? $params[1] : 0);
|
||||
$this->addListener($event_name, [$subscriber, $params[0]], isset($params[1]) ? $params[1] : 0);
|
||||
}
|
||||
else {
|
||||
foreach ($params as $listener) {
|
||||
$this->addListener($event_name, array($subscriber, $listener[0]), isset($listener[1]) ? $listener[1] : 0);
|
||||
$this->addListener($event_name, [$subscriber, $listener[0]], isset($listener[1]) ? $listener[1] : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -250,11 +250,11 @@ class ContainerAwareEventDispatcher implements EventDispatcherInterface {
|
|||
foreach ($subscriber->getSubscribedEvents() as $event_name => $params) {
|
||||
if (is_array($params) && is_array($params[0])) {
|
||||
foreach ($params as $listener) {
|
||||
$this->removeListener($event_name, array($subscriber, $listener[0]));
|
||||
$this->removeListener($event_name, [$subscriber, $listener[0]]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->removeListener($event_name, array($subscriber, is_string($params) ? $params : $params[0]));
|
||||
$this->removeListener($event_name, [$subscriber, is_string($params) ? $params : $params[0]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class FileSystem {
|
|||
* suitable temporary directory can be found.
|
||||
*/
|
||||
public static function getOsTemporaryDirectory() {
|
||||
$directories = array();
|
||||
$directories = [];
|
||||
|
||||
// Has PHP been set with an upload_tmp_dir?
|
||||
if (ini_get('upload_tmp_dir')) {
|
||||
|
|
|
@ -85,7 +85,7 @@ class PoHeader {
|
|||
* Plural form component from the header, for example:
|
||||
* 'nplurals=2; plural=(n > 1);'.
|
||||
*/
|
||||
function getPluralForms() {
|
||||
public function getPluralForms() {
|
||||
return $this->_pluralForms;
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ class PoHeader {
|
|||
* @param string $languageName
|
||||
* Human readable language name.
|
||||
*/
|
||||
function setLanguageName($languageName) {
|
||||
public function setLanguageName($languageName) {
|
||||
$this->_languageName = $languageName;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ class PoHeader {
|
|||
* @return string
|
||||
* The human readable language name.
|
||||
*/
|
||||
function getLanguageName() {
|
||||
public function getLanguageName() {
|
||||
return $this->_languageName;
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ class PoHeader {
|
|||
* @param string $projectName
|
||||
* Human readable project name.
|
||||
*/
|
||||
function setProjectName($projectName) {
|
||||
public function setProjectName($projectName) {
|
||||
$this->_projectName = $projectName;
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ class PoHeader {
|
|||
* @return string
|
||||
* The human readable project name.
|
||||
*/
|
||||
function getProjectName() {
|
||||
public function getProjectName() {
|
||||
return $this->_projectName;
|
||||
}
|
||||
|
||||
|
@ -190,10 +190,10 @@ class PoHeader {
|
|||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
function parsePluralForms($pluralforms) {
|
||||
$plurals = array();
|
||||
public function parsePluralForms($pluralforms) {
|
||||
$plurals = [];
|
||||
// First, delete all whitespace.
|
||||
$pluralforms = strtr($pluralforms, array(" " => "", "\t" => ""));
|
||||
$pluralforms = strtr($pluralforms, [" " => "", "\t" => ""]);
|
||||
|
||||
// Select the parts that define nplurals and plural.
|
||||
$nplurals = strstr($pluralforms, "nplurals=");
|
||||
|
@ -215,7 +215,7 @@ class PoHeader {
|
|||
|
||||
// If the number of plurals is zero, we return a default result.
|
||||
if ($nplurals == 0) {
|
||||
return array($nplurals, array('default' => 0));
|
||||
return [$nplurals, ['default' => 0]];
|
||||
}
|
||||
|
||||
// Calculate possible plural positions of different plural values. All known
|
||||
|
@ -233,7 +233,7 @@ class PoHeader {
|
|||
});
|
||||
$plurals['default'] = $default;
|
||||
|
||||
return array($nplurals, $plurals);
|
||||
return [$nplurals, $plurals];
|
||||
}
|
||||
else {
|
||||
throw new \Exception('The plural formula could not be parsed.');
|
||||
|
@ -250,7 +250,7 @@ class PoHeader {
|
|||
* An associative array of key-value pairs.
|
||||
*/
|
||||
private function parseHeader($header) {
|
||||
$header_parsed = array();
|
||||
$header_parsed = [];
|
||||
$lines = array_map('trim', explode("\n", $header));
|
||||
foreach ($lines as $line) {
|
||||
if ($line) {
|
||||
|
@ -275,17 +275,17 @@ class PoHeader {
|
|||
*/
|
||||
private function parseArithmetic($string) {
|
||||
// Operator precedence table.
|
||||
$precedence = array("(" => -1, ")" => -1, "?" => 1, ":" => 1, "||" => 3, "&&" => 4, "==" => 5, "!=" => 5, "<" => 6, ">" => 6, "<=" => 6, ">=" => 6, "+" => 7, "-" => 7, "*" => 8, "/" => 8, "%" => 8);
|
||||
$precedence = ["(" => -1, ")" => -1, "?" => 1, ":" => 1, "||" => 3, "&&" => 4, "==" => 5, "!=" => 5, "<" => 6, ">" => 6, "<=" => 6, ">=" => 6, "+" => 7, "-" => 7, "*" => 8, "/" => 8, "%" => 8];
|
||||
// Right associativity.
|
||||
$right_associativity = array("?" => 1, ":" => 1);
|
||||
$right_associativity = ["?" => 1, ":" => 1];
|
||||
|
||||
$tokens = $this->tokenizeFormula($string);
|
||||
|
||||
// Parse by converting into infix notation then back into postfix
|
||||
// Operator stack - holds math operators and symbols.
|
||||
$operator_stack = array();
|
||||
$operator_stack = [];
|
||||
// Element Stack - holds data to be operated on.
|
||||
$element_stack = array();
|
||||
$element_stack = [];
|
||||
|
||||
foreach ($tokens as $token) {
|
||||
$current_token = $token;
|
||||
|
@ -373,7 +373,7 @@ class PoHeader {
|
|||
*/
|
||||
private function tokenizeFormula($formula) {
|
||||
$formula = str_replace(" ", "", $formula);
|
||||
$tokens = array();
|
||||
$tokens = [];
|
||||
for ($i = 0; $i < strlen($formula); $i++) {
|
||||
if (is_numeric($formula[$i])) {
|
||||
$num = $formula[$i];
|
||||
|
|
|
@ -59,7 +59,7 @@ class PoItem {
|
|||
*
|
||||
* @return string with langcode
|
||||
*/
|
||||
function getLangcode() {
|
||||
public function getLangcode() {
|
||||
return $this->_langcode;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ class PoItem {
|
|||
*
|
||||
* @param string $langcode
|
||||
*/
|
||||
function setLangcode($langcode) {
|
||||
public function setLangcode($langcode) {
|
||||
$this->_langcode = $langcode;
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ class PoItem {
|
|||
*
|
||||
* @return string $context
|
||||
*/
|
||||
function getContext() {
|
||||
public function getContext() {
|
||||
return $this->_context;
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ class PoItem {
|
|||
*
|
||||
* @param string $context
|
||||
*/
|
||||
function setContext($context) {
|
||||
public function setContext($context) {
|
||||
$this->_context = $context;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ class PoItem {
|
|||
*
|
||||
* @return string or array $translation
|
||||
*/
|
||||
function getSource() {
|
||||
public function getSource() {
|
||||
return $this->_source;
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ class PoItem {
|
|||
*
|
||||
* @param string or array $source
|
||||
*/
|
||||
function setSource($source) {
|
||||
public function setSource($source) {
|
||||
$this->_source = $source;
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ class PoItem {
|
|||
*
|
||||
* @return string or array $translation
|
||||
*/
|
||||
function getTranslation() {
|
||||
public function getTranslation() {
|
||||
return $this->_translation;
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ class PoItem {
|
|||
*
|
||||
* @param string or array $translation
|
||||
*/
|
||||
function setTranslation($translation) {
|
||||
public function setTranslation($translation) {
|
||||
$this->_translation = $translation;
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ class PoItem {
|
|||
*
|
||||
* @param bool $plural
|
||||
*/
|
||||
function setPlural($plural) {
|
||||
public function setPlural($plural) {
|
||||
$this->_plural = $plural;
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ class PoItem {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
function isPlural() {
|
||||
public function isPlural() {
|
||||
return $this->_plural;
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ class PoItem {
|
|||
*
|
||||
* @return String $comment
|
||||
*/
|
||||
function getComment() {
|
||||
public function getComment() {
|
||||
return $this->_comment;
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ class PoItem {
|
|||
*
|
||||
* @param string $comment
|
||||
*/
|
||||
function setComment($comment) {
|
||||
public function setComment($comment) {
|
||||
$this->_comment = $comment;
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ class PoItem {
|
|||
*
|
||||
* @param array $values
|
||||
*/
|
||||
public function setFromArray(array $values = array()) {
|
||||
public function setFromArray(array $values = []) {
|
||||
if (isset($values['context'])) {
|
||||
$this->setContext($values['context']);
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ class PoMemoryWriter implements PoWriterInterface {
|
|||
/**
|
||||
* Constructor, initialize empty items.
|
||||
*/
|
||||
function __construct() {
|
||||
$this->_items = array();
|
||||
public function __construct() {
|
||||
$this->_items = [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -57,7 +57,7 @@ class PoMemoryWriter implements PoWriterInterface {
|
|||
*
|
||||
* Not implemented. Not relevant for the MemoryWriter.
|
||||
*/
|
||||
function setLangcode($langcode) {
|
||||
public function setLangcode($langcode) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -65,7 +65,7 @@ class PoMemoryWriter implements PoWriterInterface {
|
|||
*
|
||||
* Not implemented. Not relevant for the MemoryWriter.
|
||||
*/
|
||||
function getLangcode() {
|
||||
public function getLangcode() {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -73,7 +73,7 @@ class PoMemoryWriter implements PoWriterInterface {
|
|||
*
|
||||
* Not implemented. Not relevant for the MemoryWriter.
|
||||
*/
|
||||
function getHeader() {
|
||||
public function getHeader() {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -81,7 +81,7 @@ class PoMemoryWriter implements PoWriterInterface {
|
|||
*
|
||||
* Not implemented. Not relevant for the MemoryWriter.
|
||||
*/
|
||||
function setHeader(PoHeader $header) {
|
||||
public function setHeader(PoHeader $header) {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ interface PoMetadataInterface {
|
|||
/**
|
||||
* Get header metadata.
|
||||
*
|
||||
* @return \Drupal\Component\Gettext\PoHeader $header
|
||||
* @return \Drupal\Component\Gettext\PoHeader
|
||||
* Header instance representing metadata in a PO header.
|
||||
*/
|
||||
public function getHeader();
|
||||
|
|
|
@ -39,7 +39,7 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
private $_current_item = array();
|
||||
private $_current_item = [];
|
||||
|
||||
/**
|
||||
* Current plural index for plural translations.
|
||||
|
@ -261,14 +261,14 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface {
|
|||
$this->_line_number++;
|
||||
|
||||
// Initialize common values for error logging.
|
||||
$log_vars = array(
|
||||
$log_vars = [
|
||||
'%uri' => $this->getURI(),
|
||||
'%line' => $this->_line_number,
|
||||
);
|
||||
];
|
||||
|
||||
// Trim away the linefeed. \\n might appear at the end of the string if
|
||||
// another line continuing the same string follows. We can remove that.
|
||||
$line = trim(strtr($line, array("\\\n" => "")));
|
||||
$line = trim(strtr($line, ["\\\n" => ""]));
|
||||
|
||||
if (!strncmp('#', $line, 1)) {
|
||||
// Lines starting with '#' are comments.
|
||||
|
@ -282,7 +282,7 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface {
|
|||
$this->setItemFromArray($this->_current_item);
|
||||
|
||||
// Start a new entry for the comment.
|
||||
$this->_current_item = array();
|
||||
$this->_current_item = [];
|
||||
$this->_current_item['#'][] = substr($line, 1);
|
||||
|
||||
$this->_context = 'COMMENT';
|
||||
|
@ -319,7 +319,7 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface {
|
|||
if (is_string($this->_current_item['msgid'])) {
|
||||
// The first value was stored as string. Now we know the context is
|
||||
// plural, it is converted to array.
|
||||
$this->_current_item['msgid'] = array($this->_current_item['msgid']);
|
||||
$this->_current_item['msgid'] = [$this->_current_item['msgid']];
|
||||
}
|
||||
$this->_current_item['msgid'][] = $quoted;
|
||||
|
||||
|
@ -334,7 +334,7 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface {
|
|||
$this->setItemFromArray($this->_current_item);
|
||||
|
||||
// Start a new context for the msgid.
|
||||
$this->_current_item = array();
|
||||
$this->_current_item = [];
|
||||
}
|
||||
elseif ($this->_context == 'MSGID') {
|
||||
// We are currently already in the context, meaning we passed an id with no data.
|
||||
|
@ -363,7 +363,7 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface {
|
|||
if (($this->_context == 'MSGSTR') || ($this->_context == 'MSGSTR_ARR')) {
|
||||
// We are currently in string context, save current item.
|
||||
$this->setItemFromArray($this->_current_item);
|
||||
$this->_current_item = array();
|
||||
$this->_current_item = [];
|
||||
}
|
||||
elseif (!empty($this->_current_item['msgctxt'])) {
|
||||
// A context cannot apply to another context.
|
||||
|
@ -421,7 +421,7 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface {
|
|||
return FALSE;
|
||||
}
|
||||
if (!isset($this->_current_item['msgstr']) || !is_array($this->_current_item['msgstr'])) {
|
||||
$this->_current_item['msgstr'] = array();
|
||||
$this->_current_item['msgstr'] = [];
|
||||
}
|
||||
|
||||
$this->_current_item['msgstr'][$this->_current_plural_index] = $quoted;
|
||||
|
@ -500,7 +500,7 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface {
|
|||
// Empty line read or EOF of PO stream, close out the last entry.
|
||||
if (($this->_context == 'MSGSTR') || ($this->_context == 'MSGSTR_ARR')) {
|
||||
$this->setItemFromArray($this->_current_item);
|
||||
$this->_current_item = array();
|
||||
$this->_current_item = [];
|
||||
}
|
||||
elseif ($this->_context != 'COMMENT') {
|
||||
$this->_errors[] = SafeMarkup::format('The translation stream %uri ended unexpectedly at line %line.', $log_vars);
|
||||
|
@ -547,7 +547,7 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface {
|
|||
* @return
|
||||
* The string parsed from inside the quotes.
|
||||
*/
|
||||
function parseQuoted($string) {
|
||||
public function parseQuoted($string) {
|
||||
if (substr($string, 0, 1) != substr($string, -1, 1)) {
|
||||
// Start and end quotes must be the same.
|
||||
return FALSE;
|
||||
|
|
|
@ -56,13 +56,13 @@ class Graph {
|
|||
* identifier.
|
||||
*/
|
||||
public function searchAndSort() {
|
||||
$state = array(
|
||||
$state = [
|
||||
// The order of last visit of the depth first search. This is the reverse
|
||||
// of the topological order if the graph is acyclic.
|
||||
'last_visit_order' => array(),
|
||||
'last_visit_order' => [],
|
||||
// The components of the graph.
|
||||
'components' => array(),
|
||||
);
|
||||
'components' => [],
|
||||
];
|
||||
// Perform the actual search.
|
||||
foreach ($this->graph as $start => $data) {
|
||||
$this->depthFirstSearch($state, $start);
|
||||
|
@ -71,7 +71,7 @@ class Graph {
|
|||
// We do such a numbering that every component starts with 0. This is useful
|
||||
// for module installs as we can install every 0 weighted module in one
|
||||
// request, and then every 1 weighted etc.
|
||||
$component_weights = array();
|
||||
$component_weights = [];
|
||||
|
||||
foreach ($state['last_visit_order'] as $vertex) {
|
||||
$component = $this->graph[$vertex]['component'];
|
||||
|
@ -108,7 +108,7 @@ class Graph {
|
|||
return;
|
||||
}
|
||||
// Mark $start as visited.
|
||||
$this->graph[$start]['paths'] = array();
|
||||
$this->graph[$start]['paths'] = [];
|
||||
|
||||
// Assign $start to the current component.
|
||||
$this->graph[$start]['component'] = $component;
|
||||
|
|
|
@ -68,7 +68,7 @@ class FileReadOnlyStorage implements PhpStorageInterface {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
function writeable() {
|
||||
public function writeable() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ class FileReadOnlyStorage implements PhpStorageInterface {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function listAll() {
|
||||
$names = array();
|
||||
$names = [];
|
||||
if (file_exists($this->directory)) {
|
||||
foreach (new \DirectoryIterator($this->directory) as $fileinfo) {
|
||||
if (!$fileinfo->isDot()) {
|
||||
|
|
|
@ -49,12 +49,7 @@ class FileStorage implements PhpStorageInterface {
|
|||
public function save($name, $code) {
|
||||
$path = $this->getFullPath($name);
|
||||
$directory = dirname($path);
|
||||
if ($this->ensureDirectory($directory)) {
|
||||
$htaccess_path = $directory . '/.htaccess';
|
||||
if (!file_exists($htaccess_path) && file_put_contents($htaccess_path, static::htaccessLines())) {
|
||||
@chmod($htaccess_path, 0444);
|
||||
}
|
||||
}
|
||||
$this->ensureDirectory($directory);
|
||||
return (bool) file_put_contents($path, $code);
|
||||
}
|
||||
|
||||
|
@ -120,9 +115,6 @@ EOF;
|
|||
* The directory path.
|
||||
* @param int $mode
|
||||
* The mode, permissions, the directory should have.
|
||||
*
|
||||
* @return bool
|
||||
* TRUE if the directory exists or has been created, FALSE otherwise.
|
||||
*/
|
||||
protected function ensureDirectory($directory, $mode = 0777) {
|
||||
if ($this->createDirectory($directory, $mode)) {
|
||||
|
@ -246,7 +238,7 @@ EOF;
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function listAll() {
|
||||
$names = array();
|
||||
$names = [];
|
||||
if (file_exists($this->directory)) {
|
||||
foreach (new \DirectoryIterator($this->directory) as $fileinfo) {
|
||||
if (!$fileinfo->isDot()) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace Drupal\Component\PhpStorage;
|
||||
|
||||
use Drupal\Component\Utility\Crypt;
|
||||
|
||||
/**
|
||||
* Stores PHP code in files with securely hashed names.
|
||||
*
|
||||
|
@ -130,7 +132,7 @@ class MTimeProtectedFastFileStorage extends FileStorage {
|
|||
if (!isset($directory_mtime)) {
|
||||
$directory_mtime = file_exists($directory) ? filemtime($directory) : 0;
|
||||
}
|
||||
return $directory . '/' . hash_hmac('sha256', $name, $this->secret . $directory_mtime) . '.php';
|
||||
return $directory . '/' . Crypt::hmacBase64($name, $this->secret . $directory_mtime) . '.php';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -225,7 +227,7 @@ class MTimeProtectedFastFileStorage extends FileStorage {
|
|||
*/
|
||||
protected function tempnam($directory, $prefix) {
|
||||
do {
|
||||
$path = $directory . '/' . $prefix . substr(str_shuffle(hash('sha256', microtime())), 0, 10);
|
||||
$path = $directory . '/' . $prefix . Crypt::randomBytesBase64(20);
|
||||
} while (file_exists($path));
|
||||
return $path;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ class Context implements ContextInterface {
|
|||
if (empty($this->contextDefinition['class'])) {
|
||||
throw new ContextException("An error was encountered while trying to validate the context.");
|
||||
}
|
||||
return array(new Type($this->contextDefinition['class']));
|
||||
return [new Type($this->contextDefinition['class'])];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -67,7 +67,7 @@ abstract class ContextAwarePluginBase extends PluginBase implements ContextAware
|
|||
*/
|
||||
public function getContextDefinitions() {
|
||||
$definition = $this->getPluginDefinition();
|
||||
return !empty($definition['context']) ? $definition['context'] : array();
|
||||
return !empty($definition['context']) ? $definition['context'] : [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -114,7 +114,7 @@ abstract class ContextAwarePluginBase extends PluginBase implements ContextAware
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function getContextValues() {
|
||||
$values = array();
|
||||
$values = [];
|
||||
foreach ($this->getContextDefinitions() as $name => $definition) {
|
||||
$values[$name] = isset($this->context[$name]) ? $this->context[$name]->getContextValue() : NULL;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ interface ContextAwarePluginInterface extends PluginInspectionInterface {
|
|||
* @param string $name
|
||||
* The name of the context in the plugin definition.
|
||||
*
|
||||
* @return \Drupal\Component\Plugin\Context\ContextDefinitionInterface.
|
||||
* @return \Drupal\Component\Plugin\Context\ContextDefinitionInterface
|
||||
* The definition against which the context value must validate.
|
||||
*
|
||||
* @throws \Drupal\Component\Plugin\Exception\PluginException
|
||||
|
@ -103,7 +103,7 @@ interface ContextAwarePluginInterface extends PluginInspectionInterface {
|
|||
* The value to set the context to. The value has to validate against the
|
||||
* provided context definition.
|
||||
*
|
||||
* @return \Drupal\Component\Plugin\ContextAwarePluginInterface.
|
||||
* @return \Drupal\Component\Plugin\ContextAwarePluginInterface
|
||||
* A context aware plugin object for chaining.
|
||||
*
|
||||
* @throws \Drupal\Component\Plugin\Exception\PluginException
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Component\Plugin\Definition;
|
||||
|
||||
/**
|
||||
* Provides an interface for a derivable plugin definition.
|
||||
*
|
||||
* @see \Drupal\Component\Plugin\Derivative\DeriverInterface
|
||||
*/
|
||||
interface DerivablePluginDefinitionInterface extends PluginDefinitionInterface {
|
||||
|
||||
/**
|
||||
* Gets the name of the deriver of this plugin definition, if it exists.
|
||||
*
|
||||
* @return string|null
|
||||
* Either the deriver class name, or NULL if the plugin is not derived.
|
||||
*/
|
||||
public function getDeriver();
|
||||
|
||||
/**
|
||||
* Sets the deriver of this plugin definition.
|
||||
*
|
||||
* @param string|null $deriver
|
||||
* Either the name of a class that implements
|
||||
* \Drupal\Component\Plugin\Derivative\DeriverInterface, or NULL.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDeriver($deriver);
|
||||
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Component\Plugin\Definition;
|
||||
|
||||
/**
|
||||
* Provides object-based plugin definitions.
|
||||
*/
|
||||
class PluginDefinition implements PluginDefinitionInterface {
|
||||
|
||||
/**
|
||||
* The plugin ID.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* A fully qualified class name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $class;
|
||||
|
||||
/**
|
||||
* The plugin provider.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $provider;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function id() {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setClass($class) {
|
||||
$this->class = $class;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getClass() {
|
||||
return $this->class;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getProvider() {
|
||||
return $this->provider;
|
||||
}
|
||||
|
||||
}
|
|
@ -11,6 +11,14 @@ namespace Drupal\Component\Plugin\Definition;
|
|||
*/
|
||||
interface PluginDefinitionInterface {
|
||||
|
||||
/**
|
||||
* Gets the unique identifier of the plugin.
|
||||
*
|
||||
* @return string
|
||||
* The unique identifier of the plugin.
|
||||
*/
|
||||
public function id();
|
||||
|
||||
/**
|
||||
* Sets the class.
|
||||
*
|
||||
|
@ -32,4 +40,15 @@ interface PluginDefinitionInterface {
|
|||
*/
|
||||
public function getClass();
|
||||
|
||||
/**
|
||||
* Gets the plugin provider.
|
||||
*
|
||||
* The provider is the name of the module that provides the plugin, or "core',
|
||||
* or "component".
|
||||
*
|
||||
* @return string
|
||||
* The provider.
|
||||
*/
|
||||
public function getProvider();
|
||||
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ abstract class DeriverBase implements DeriverInterface {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $derivatives = array();
|
||||
protected $derivatives = [];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Drupal\Component\Plugin\Discovery;
|
||||
|
||||
use Drupal\Component\Plugin\Definition\DerivablePluginDefinitionInterface;
|
||||
use Drupal\Component\Plugin\Exception\InvalidDeriverException;
|
||||
|
||||
/**
|
||||
|
@ -20,7 +21,7 @@ class DerivativeDiscoveryDecorator implements DiscoveryInterface {
|
|||
* @var \Drupal\Component\Plugin\Derivative\DeriverInterface[]
|
||||
* Keys are base plugin IDs.
|
||||
*/
|
||||
protected $derivers = array();
|
||||
protected $derivers = [];
|
||||
|
||||
/**
|
||||
* The decorated plugin discovery.
|
||||
|
@ -93,7 +94,7 @@ class DerivativeDiscoveryDecorator implements DiscoveryInterface {
|
|||
* DiscoveryInterface::getDefinitions().
|
||||
*/
|
||||
protected function getDerivatives(array $base_plugin_definitions) {
|
||||
$plugin_definitions = array();
|
||||
$plugin_definitions = [];
|
||||
foreach ($base_plugin_definitions as $base_plugin_id => $plugin_definition) {
|
||||
$deriver = $this->getDeriver($base_plugin_id, $plugin_definition);
|
||||
if ($deriver) {
|
||||
|
@ -136,7 +137,7 @@ class DerivativeDiscoveryDecorator implements DiscoveryInterface {
|
|||
return explode(':', $plugin_id, 2);
|
||||
}
|
||||
|
||||
return array($plugin_id, NULL);
|
||||
return [$plugin_id, NULL];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -203,12 +204,21 @@ class DerivativeDiscoveryDecorator implements DiscoveryInterface {
|
|||
*/
|
||||
protected function getDeriverClass($base_definition) {
|
||||
$class = NULL;
|
||||
if ((is_array($base_definition) || ($base_definition = (array) $base_definition)) && (isset($base_definition['deriver']) && $class = $base_definition['deriver'])) {
|
||||
$id = NULL;
|
||||
if ($base_definition instanceof DerivablePluginDefinitionInterface) {
|
||||
$class = $base_definition->getDeriver();
|
||||
$id = $base_definition->id();
|
||||
}
|
||||
if ((is_array($base_definition) || ($base_definition = (array) $base_definition)) && (isset($base_definition['deriver']))) {
|
||||
$class = $base_definition['deriver'];
|
||||
$id = $base_definition['id'];
|
||||
}
|
||||
if ($class) {
|
||||
if (!class_exists($class)) {
|
||||
throw new InvalidDeriverException(sprintf('Plugin (%s) deriver "%s" does not exist.', $base_definition['id'], $class));
|
||||
throw new InvalidDeriverException(sprintf('Plugin (%s) deriver "%s" does not exist.', $id, $class));
|
||||
}
|
||||
if (!is_subclass_of($class, '\Drupal\Component\Plugin\Derivative\DeriverInterface')) {
|
||||
throw new InvalidDeriverException(sprintf('Plugin (%s) deriver "%s" must implement \Drupal\Component\Plugin\Derivative\DeriverInterface.', $base_definition['id'], $class));
|
||||
throw new InvalidDeriverException(sprintf('Plugin (%s) deriver "%s" must implement \Drupal\Component\Plugin\Derivative\DeriverInterface.', $id, $class));
|
||||
}
|
||||
}
|
||||
return $class;
|
||||
|
@ -229,7 +239,7 @@ class DerivativeDiscoveryDecorator implements DiscoveryInterface {
|
|||
// Use this definition as defaults if a plugin already defined itself as
|
||||
// this derivative, but filter out empty values first.
|
||||
$filtered_base = array_filter($base_plugin_definition);
|
||||
$derivative_definition = $filtered_base + ($derivative_definition ?: array());
|
||||
$derivative_definition = $filtered_base + ($derivative_definition ?: []);
|
||||
// Add back any empty keys that the derivative didn't have.
|
||||
return $derivative_definition + $base_plugin_definition;
|
||||
}
|
||||
|
@ -238,7 +248,7 @@ class DerivativeDiscoveryDecorator implements DiscoveryInterface {
|
|||
* Passes through all unknown calls onto the decorated object.
|
||||
*/
|
||||
public function __call($method, $args) {
|
||||
return call_user_func_array(array($this->decorated, $method), $args);
|
||||
return call_user_func_array([$this->decorated, $method], $args);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class StaticDiscovery implements DiscoveryInterface {
|
|||
*/
|
||||
public function getDefinitions() {
|
||||
if (!$this->definitions) {
|
||||
$this->definitions = array();
|
||||
$this->definitions = [];
|
||||
}
|
||||
return $this->definitions;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ class StaticDiscoveryDecorator extends StaticDiscovery {
|
|||
* Passes through all unknown calls onto the decorated object
|
||||
*/
|
||||
public function __call($method, $args) {
|
||||
return call_user_func_array(array($this->decorated, $method), $args);
|
||||
return call_user_func_array([$this->decorated, $method], $args);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ class DefaultFactory implements FactoryInterface {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createInstance($plugin_id, array $configuration = array()) {
|
||||
public function createInstance($plugin_id, array $configuration = []) {
|
||||
$plugin_definition = $this->discovery->getDefinition($plugin_id);
|
||||
$plugin_class = static::getPluginClass($plugin_id, $plugin_definition, $this->interface);
|
||||
return new $plugin_class($configuration, $plugin_id, $plugin_definition);
|
||||
|
|
|
@ -21,6 +21,6 @@ interface FactoryInterface {
|
|||
* @throws \Drupal\Component\Plugin\Exception\PluginException
|
||||
* If the instance cannot be created, such as if the ID is invalid.
|
||||
*/
|
||||
public function createInstance($plugin_id, array $configuration = array());
|
||||
public function createInstance($plugin_id, array $configuration = []);
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ class ReflectionFactory extends DefaultFactory {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createInstance($plugin_id, array $configuration = array()) {
|
||||
public function createInstance($plugin_id, array $configuration = []) {
|
||||
$plugin_definition = $this->discovery->getDefinition($plugin_id);
|
||||
$plugin_class = static::getPluginClass($plugin_id, $plugin_definition, $this->interface);
|
||||
|
||||
|
@ -51,7 +51,7 @@ class ReflectionFactory extends DefaultFactory {
|
|||
*/
|
||||
protected function getInstanceArguments(\ReflectionClass $reflector, $plugin_id, $plugin_definition, array $configuration) {
|
||||
|
||||
$arguments = array();
|
||||
$arguments = [];
|
||||
foreach ($reflector->getMethod('__construct')->getParameters() as $param) {
|
||||
$param_name = $param->getName();
|
||||
|
||||
|
|
|
@ -18,6 +18,6 @@ interface FallbackPluginManagerInterface {
|
|||
* @return string
|
||||
* The id of an existing plugin to use when the plugin does not exist.
|
||||
*/
|
||||
public function getFallbackPluginId($plugin_id, array $configuration = array());
|
||||
public function getFallbackPluginId($plugin_id, array $configuration = []);
|
||||
|
||||
}
|
||||
|
|
|
@ -14,14 +14,14 @@ abstract class LazyPluginCollection implements \IteratorAggregate, \Countable {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $pluginInstances = array();
|
||||
protected $pluginInstances = [];
|
||||
|
||||
/**
|
||||
* Stores the IDs of all potential plugin instances.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $instanceIDs = array();
|
||||
protected $instanceIDs = [];
|
||||
|
||||
/**
|
||||
* Initializes and stores a plugin.
|
||||
|
@ -53,7 +53,7 @@ abstract class LazyPluginCollection implements \IteratorAggregate, \Countable {
|
|||
* Clears all instantiated plugins.
|
||||
*/
|
||||
public function clear() {
|
||||
$this->pluginInstances = array();
|
||||
$this->pluginInstances = [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -68,7 +68,7 @@ abstract class PluginManagerBase implements PluginManagerInterface {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createInstance($plugin_id, array $configuration = array()) {
|
||||
public function createInstance($plugin_id, array $configuration = []) {
|
||||
// If this PluginManager has fallback capabilities catch
|
||||
// PluginNotFoundExceptions.
|
||||
if ($this instanceof FallbackPluginManagerInterface) {
|
||||
|
|
|
@ -44,7 +44,7 @@ class PhpTransliteration implements TransliterationInterface {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $languageOverrides = array();
|
||||
protected $languageOverrides = [];
|
||||
|
||||
/**
|
||||
* Non-language-specific transliteration tables.
|
||||
|
@ -56,7 +56,7 @@ class PhpTransliteration implements TransliterationInterface {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $genericMap = array();
|
||||
protected $genericMap = [];
|
||||
|
||||
/**
|
||||
* Constructs a transliteration object.
|
||||
|
@ -83,9 +83,9 @@ class PhpTransliteration implements TransliterationInterface {
|
|||
// few characters that aren't accented letters mixed in. So define the
|
||||
// ranges and the excluded characters.
|
||||
$range1 = $code > 0x00bf && $code < 0x017f;
|
||||
$exclusions_range1 = array(0x00d0, 0x00d7, 0x00f0, 0x00f7, 0x0138, 0x014a, 0x014b);
|
||||
$exclusions_range1 = [0x00d0, 0x00d7, 0x00f0, 0x00f7, 0x0138, 0x014a, 0x014b];
|
||||
$range2 = $code > 0x01cc && $code < 0x0250;
|
||||
$exclusions_range2 = array(0x01DD, 0x01f7, 0x021c, 0x021d, 0x0220, 0x0221, 0x0241, 0x0242, 0x0245);
|
||||
$exclusions_range2 = [0x01DD, 0x01f7, 0x021c, 0x021d, 0x0220, 0x0221, 0x0241, 0x0242, 0x0245];
|
||||
|
||||
$replacement = $character;
|
||||
if (($range1 && !in_array($code, $exclusions_range1)) || ($range2 && !in_array($code, $exclusions_range2))) {
|
||||
|
@ -246,7 +246,7 @@ class PhpTransliteration implements TransliterationInterface {
|
|||
include $file;
|
||||
}
|
||||
if (!isset($overrides) || !is_array($overrides)) {
|
||||
$overrides = array($langcode => array());
|
||||
$overrides = [$langcode => []];
|
||||
}
|
||||
$this->languageOverrides[$langcode] = $overrides[$langcode];
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ class PhpTransliteration implements TransliterationInterface {
|
|||
include $file;
|
||||
}
|
||||
if (!isset($base) || !is_array($base)) {
|
||||
$base = array();
|
||||
$base = [];
|
||||
}
|
||||
|
||||
// Save this data.
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
* German transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$overrides['de'] = array(
|
||||
$overrides['de'] = [
|
||||
0xC4 => 'Ae',
|
||||
0xD6 => 'Oe',
|
||||
0xDC => 'Ue',
|
||||
0xE4 => 'ae',
|
||||
0xF6 => 'oe',
|
||||
0xFC => 'ue',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
* Danish transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$overrides['dk'] = array(
|
||||
$overrides['dk'] = [
|
||||
0xC5 => 'Aa',
|
||||
0xD8 => 'Oe',
|
||||
0xE5 => 'aa',
|
||||
0xF8 => 'oe',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Esperanto transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$overrides['eo'] = array(
|
||||
$overrides['eo'] = [
|
||||
0x18 => 'Cx',
|
||||
0x19 => 'cx',
|
||||
0x11C => 'Gx',
|
||||
|
@ -18,4 +18,4 @@ $overrides['eo'] = array(
|
|||
0x15D => 'sx',
|
||||
0x16C => 'Ux',
|
||||
0x16D => 'ux',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Kyrgyz transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$overrides['kg'] = array(
|
||||
$overrides['kg'] = [
|
||||
0x41 => 'E',
|
||||
0x416 => 'C',
|
||||
0x419 => 'J',
|
||||
|
@ -28,4 +28,4 @@ $overrides['kg'] = array(
|
|||
0x4AF => 'w',
|
||||
0x4E8 => 'Q',
|
||||
0x4E9 => 'q',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
// Note: to save memory plain ASCII mappings have been left out.
|
||||
0x80 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
0x90 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
|
@ -15,4 +15,4 @@ $base = array(
|
|||
0xD0 => 'D', 'N', 'O', 'O', 'O', 'O', 'O', '*', 'O', 'U', 'U', 'U', 'U', 'Y', 'TH', 'ss',
|
||||
0xE0 => 'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i',
|
||||
0xF0 => 'd', 'n', 'o', 'o', 'o', 'o', 'o', '/', 'o', 'u', 'u', 'u', 'u', 'y', 'th', 'y',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'A', 'a', 'A', 'a', 'A', 'a', 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd',
|
||||
0x10 => 'D', 'd', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g',
|
||||
0x20 => 'G', 'g', 'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'i', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', '@', 'A', 'a',
|
||||
0xE0 => 'A', 'a', 'AE', 'ae', 'G', 'g', 'G', 'g', 'K', 'k', 'O', 'o', 'O', 'o', 'ZH', 'zh',
|
||||
0xF0 => 'j', 'DZ', 'Dz', 'dz', 'G', 'g', 'HV', 'W', 'N', 'n', 'A', 'a', 'AE', 'ae', 'O', 'o',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'A', 'a', 'A', 'a', 'E', 'e', 'E', 'e', 'I', 'i', 'I', 'i', 'O', 'o', 'O', 'o',
|
||||
0x10 => 'R', 'r', 'R', 'r', 'U', 'u', 'U', 'u', 'S', 's', 'T', 't', 'Y', 'y', 'H', 'h',
|
||||
0x20 => 'N', 'd', 'OU', 'ou', 'Z', 'z', 'A', 'a', 'E', 'e', 'O', 'o', 'O', 'o', 'O', 'o',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => ':', '.', '`', '\'', '^', 'V', '+', '-', 'V', '.', '@', ',', '~', '"', 'R', 'X',
|
||||
0xE0 => 'G', 'l', 's', 'x', '?', '', '', '', '', '', '', '', 'V', '=', '"', NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
0x10 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
0x20 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'b', 'th', 'Y', 'Y', 'Y', 'ph', 'p', '&', NULL, NULL, 'St', 'st', 'W', 'w', 'Q', 'q',
|
||||
0xE0 => 'Sp', 'sp', 'Sh', 'sh', 'F', 'f', 'Kh', 'kh', 'H', 'h', 'G', 'g', 'CH', 'ch', 'Ti', 'ti',
|
||||
0xF0 => 'k', 'r', 's', 'j', 'TH', 'e', NULL, 'S', 's', 'S', 'S', 's', NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'E', 'E', 'D', 'G', 'E', 'Z', 'I', 'I', 'J', 'L', 'N', 'C', 'K', 'I', 'U', 'D',
|
||||
0x10 => 'A', 'B', 'V', 'G', 'D', 'E', 'Z', 'Z', 'I', 'I', 'K', 'L', 'M', 'N', 'O', 'P',
|
||||
0x20 => 'R', 'S', 'T', 'U', 'F', 'H', 'C', 'C', 'S', 'S', '', 'Y', '', 'E', 'U', 'A',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'A', 'a', 'A', 'a', 'AE', 'ae', 'E', 'e', '@', '@', '@', '@', 'Z', 'z', 'Z', 'z',
|
||||
0xE0 => 'Dz', 'dz', 'I', 'i', 'I', 'i', 'O', 'o', 'O', 'o', 'O', 'o', 'E', 'e', 'U', 'u',
|
||||
0xF0 => 'U', 'u', 'U', 'u', 'C', 'c', NULL, NULL, 'Y', 'y', NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x10 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x20 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => '', 'b', 'g', 'd', 'h', 'w', 'z', 'h', 't', 'y', 'k', 'k', 'l', 'm', 'm', 'n',
|
||||
0xE0 => 'n', 's', '`', 'p', 'p', 'z', 'z', 'q', 'r', 's', 't', NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => 'ww', 'wy', 'yy', '\'', '"', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ',', NULL, NULL, NULL,
|
||||
0x10 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ';', NULL, NULL, NULL, '?',
|
||||
0x20 => NULL, '', 'a', 'a', 'w', 'a', 'y', 'a', 'b', 't', 't', 'th', 'j', 'h', 'kh', 'd',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => '', '', 'y', 'y\'', '.', 'ae', '', '', '', '', '', '', '', '@', '#', '',
|
||||
0xE0 => '', '', '', '', '', '', '', '', '', '^', '', '', '', '', NULL, NULL,
|
||||
0xF0 => '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Sh', 'D', 'Gh', '&', '+m', NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => '//', '/', ',', '!', '!', '-', ',', ',', ';', '?', '~', '{', '}', '*', NULL, '',
|
||||
0x10 => '\'', '', 'b', 'g', 'g', 'd', 'dr', 'h', 'w', 'z', 'h', 't', 't', 'y', 'yh', 'k',
|
||||
0x20 => 'l', 'm', 'n', 's', 's', '`', 'p', 'p', 's', 'q', 'r', 'sh', 't', NULL, NULL, NULL,
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, 'N', 'N', 'h', NULL, 'a', 'a', 'i', 'i', 'u', 'u', 'r', 'l', 'e', 'e', 'e',
|
||||
0x10 => 'ai', 'o', 'o', 'o', 'au', 'ka', 'kha', 'ga', 'gha', 'na', 'ca', 'cha', 'ja', 'jha', 'na', 'ta',
|
||||
0x20 => 'tha', 'da', 'dha', 'na', 'ta', 'tha', 'da', 'dha', 'na', 'na', 'pa', 'pha', 'ba', 'bha', 'ma', 'ya',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, '+', NULL, NULL, NULL, NULL, 'da', 'dha', NULL, 'ya',
|
||||
0xE0 => 'r', 'l', 'L', 'LL', NULL, NULL, '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
0xF0 => 'ra', 'ra', 'Rs', 'Rs', '1/', '2/', '3/', '4/', ' 1 - 1/', '/16', '', NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, NULL, 'N', NULL, NULL, 'a', 'a', 'i', 'i', 'u', 'u', NULL, NULL, NULL, NULL, 'e',
|
||||
0x10 => 'ai', NULL, NULL, 'o', 'au', 'ka', 'kha', 'ga', 'gha', 'na', 'ca', 'cha', 'ja', 'jha', 'na', 'ta',
|
||||
0x20 => 'tha', 'da', 'dha', 'na', 'ta', 'tha', 'da', 'dha', 'na', NULL, 'pa', 'pha', 'ba', 'bha', 'ma', 'ya',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => '\'om', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => 'r', 'l', NULL, NULL, NULL, NULL, '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, 'N', 'm', 'h', NULL, 'a', 'a', 'i', 'i', 'u', 'u', 'r', 'l', NULL, NULL, 'e',
|
||||
0x10 => 'ai', NULL, NULL, 'o', 'au', 'ka', 'kha', 'ga', 'gha', 'na', 'ca', 'cha', 'ja', 'jha', 'na', 'ta',
|
||||
0x20 => 'tha', 'da', 'dha', 'na', 'ta', 'tha', 'da', 'dha', 'na', NULL, 'pa', 'pha', 'ba', 'bha', 'ma', 'ya',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, '+', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
0xF0 => '10', '100', '1000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, 'm', 'm', 'h', NULL, 'a', 'a', 'i', 'i', 'u', 'u', 'r', 'l', NULL, 'e', 'e',
|
||||
0x10 => 'ai', NULL, 'o', 'o', 'au', 'ka', 'kha', 'ga', 'gha', 'na', 'ca', 'cha', 'ja', 'jha', 'na', 'ta',
|
||||
0x20 => 'tha', 'da', 'dha', 'na', 'ta', 'tha', 'da', 'dha', 'na', NULL, 'pa', 'pha', 'ba', 'bha', 'ma', 'ya',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, '+', '+', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'la', NULL,
|
||||
0xE0 => 'r', 'l', NULL, NULL, NULL, NULL, '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, NULL, 'm', 'h', NULL, 'a', 'a', 'i', 'i', 'u', 'u', 'r', 'l', NULL, 'e', 'e',
|
||||
0x10 => 'ai', NULL, 'o', 'o', 'au', 'ka', 'kha', 'ga', 'gha', 'na', 'ca', 'cha', 'ja', 'jha', 'na', 'ta',
|
||||
0x20 => 'tha', 'da', 'dha', 'na', 'ta', 'tha', 'da', 'dha', 'na', NULL, 'pa', 'pha', 'ba', 'bha', 'ma', 'ya',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'ae', 'aae', 'i', 'ii', 'u', NULL, 'uu', NULL, 'R', 'e', 'ee', 'ai', 'o', 'oo', 'au', 'L',
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, 'RR', 'LL', ' . ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, 'k', 'kh', 'kh', 'kh', 'kh', 'kh', 'ng', 'c', 'ch', 'ch', 's', 'ch', 'y', 'd', 't',
|
||||
0x10 => 'th', 'th', 'th', 'n', 'd', 't', 'th', 'th', 'th', 'n', 'b', 'p', 'ph', 'f', 'ph', 'f',
|
||||
0x20 => 'ph', 'm', 'y', 'r', 'v', 'l', 'l', 'w', 's', 's', 's', 'h', 'l', 'x', 'h', '~',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', NULL, NULL, 'hn', 'hm', NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'AUM', '', '', '', '', '', '', '', ' // ', ' * ', '', '-', ' / ', ' / ', ' // ', ' -/ ',
|
||||
0x10 => ' +/ ', ' X/ ', ' /XX/ ', ' /X/ ', ',', '', '', '', '', '', '', '', '', '', '', '',
|
||||
0x20 => '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.5', '1.5', '2.5', '3.5', '4.5', '5.5',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'k', 'kh', 'g', 'gh', 'ng', 'c', 'ch', 'j', 'jh', 'ny', 'nny', 'tt', 'tth', 'dd', 'ddh', 'nn',
|
||||
0x10 => 'tt', 'th', 'd', 'dh', 'n', 'p', 'ph', 'b', 'bh', 'm', 'y', 'r', 'l', 'w', 's', 'h',
|
||||
0x20 => 'll', 'a', NULL, 'i', 'ii', 'u', 'uu', 'e', NULL, 'o', 'au', NULL, 'aa', 'i', 'ii', 'u',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'a', 'b', 'g', 'd', 'e', 'v', 'z', 't', 'i', 'k', 'l', 'm', 'n', 'o', 'p', 'zh',
|
||||
0xE0 => 'r', 's', 't', 'u', 'p', 'k', 'gh', 'q', 'sh', 'ch', 'ts', 'dz', 'c', 'ch', 'kh', 'j',
|
||||
0xF0 => 'h', 'e', 'y', 'ui', 'q', 'oe', 'f', NULL, NULL, NULL, NULL, ' // ', NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'g', 'kk', 'n', 'd', 'tt', 'l', 'm', 'b', 'pp', 's', 'ss', '', 'j', 'jj', 'ch', 'k',
|
||||
0x10 => 't', 'p', 'h', 'ng', 'nn', 'nd', 'nb', 'dg', 'rn', 'rr', 'rh', 'rN', 'mb', 'mN', 'bg', 'bn',
|
||||
0x20 => '', 'bs', 'bsg', 'bst', 'bsb', 'bss', 'bsj', 'bj', 'bc', 'bt', 'bp', 'bN', 'bbN', 'sg', 'sn', 'sd',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'll', 'lmg', 'lms', 'lbs', 'lbh', 'rNp', 'lss', 'lZ', 'lk', 'lQ', 'mg', 'ml', 'mb', 'ms', 'mss', 'mZ',
|
||||
0xE0 => 'mc', 'mh', 'mN', 'bl', 'bp', 'ph', 'pN', 'sg', 'sd', 'sl', 'sb', 'Z', 'g', 'ss', '', 'kh',
|
||||
0xF0 => 'N', 'Ns', 'NZ', 'pb', 'pN', 'hn', 'hl', 'hm', 'hb', 'Q', NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'ha', 'hu', 'hi', 'haa', 'hee', 'he', 'ho', NULL, 'la', 'lu', 'li', 'laa', 'lee', 'le', 'lo', 'lwa',
|
||||
0x10 => 'hha', 'hhu', 'hhi', 'hhaa', 'hhee', 'hhe', 'hho', 'hhwa', 'ma', 'mu', 'mi', 'maa', 'mee', 'me', 'mo', 'mwa',
|
||||
0x20 => 'sza', 'szu', 'szi', 'szaa', 'szee', 'sze', 'szo', 'szwa', 'ra', 'ru', 'ri', 'raa', 'ree', 're', 'ro', 'rwa',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => '`a', '`u', '`i', '`aa', '`ee', '`e', '`o', NULL, 'za', 'zu', 'zi', 'zaa', 'zee', 'ze', 'zo', 'zwa',
|
||||
0xE0 => 'zha', 'zhu', 'zhi', 'zhaa', 'zhee', 'zhe', 'zho', 'zhwa', 'ya', 'yu', 'yi', 'yaa', 'yee', 'ye', 'yo', NULL,
|
||||
0xF0 => 'da', 'du', 'di', 'daa', 'dee', 'de', 'do', 'dwa', 'dda', 'ddu', 'ddi', 'ddaa', 'ddee', 'dde', 'ddo', 'ddwa',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'ja', 'ju', 'ji', 'jaa', 'jee', 'je', 'jo', 'jwa', 'ga', 'gu', 'gi', 'gaa', 'gee', 'ge', 'go', NULL,
|
||||
0x10 => 'gwa', NULL, 'gwi', 'gwaa', 'gwee', 'gwe', NULL, NULL, 'gga', 'ggu', 'ggi', 'ggaa', 'ggee', 'gge', 'ggo', NULL,
|
||||
0x20 => 'tha', 'thu', 'thi', 'thaa', 'thee', 'the', 'tho', 'thwa', 'cha', 'chu', 'chi', 'chaa', 'chee', 'che', 'cho', 'chwa',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'so', 'su', 'sv', 'da', 'ta', 'de', 'te', 'di', 'ti', 'do', 'du', 'dv', 'dla', 'tla', 'tle', 'tli',
|
||||
0xE0 => 'tlo', 'tlu', 'tlv', 'tsa', 'tse', 'tsi', 'tso', 'tsu', 'tsv', 'wa', 'we', 'wi', 'wo', 'wu', 'wv', 'ya',
|
||||
0xF0 => 'ye', 'yi', 'yo', 'yu', 'yv', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, 'ai', 'aai', 'i', 'ii', 'u', 'uu', 'oo', 'ee', 'i', 'a', 'aa', 'we', 'we', 'wi', 'wi',
|
||||
0x10 => 'wii', 'wii', 'wo', 'wo', 'woo', 'woo', 'woo', 'wa', 'wa', 'waa', 'waa', 'waa', 'ai', 'w', '\'', 't',
|
||||
0x20 => 'k', 'sh', 's', 'n', 'w', 'n', NULL, 'w', 'c', '?', 'l', 'en', 'in', 'on', 'an', 'pai',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'n', 'ng', 'nh', 'lai', 'laai', 'li', 'lii', 'lu', 'luu', 'loo', 'la', 'laa', 'lwe', 'lwe', 'lwi', 'lwi',
|
||||
0xE0 => 'lwii', 'lwii', 'lwo', 'lwo', 'lwoo', 'lwoo', 'lwa', 'lwa', 'lwaa', 'lwaa', 'l', 'l', 'l', 'sai', 'saai', 'si',
|
||||
0xF0 => 'sii', 'su', 'suu', 'soo', 'sa', 'saa', 'swe', 'swe', 'swi', 'swi', 'swii', 'swii', 'swo', 'swo', 'swoo', 'swoo',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'swa', 'swa', 'swaa', 'swaa', 'swaa', 's', 's', 'sw', 's', 'sk', 'skw', 'sW', 'spwa', 'stwa', 'skwa', 'scwa',
|
||||
0x10 => 'she', 'shi', 'shii', 'sho', 'shoo', 'sha', 'shaa', 'shwe', 'shwe', 'shwi', 'shwi', 'shwii', 'shwii', 'shwo', 'shwo', 'shwoo',
|
||||
0x20 => 'shwoo', 'shwa', 'shwa', 'shwaa', 'shwaa', 'sh', 'jai', 'yaai', 'ji', 'jii', 'ju', 'juu', 'yoo', 'ja', 'jaa', 'ywe',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'wu', 'wo', 'we', 'wee', 'wi', 'wa', 'hwu', 'hwo', 'hwe', 'hwee', 'hwi', 'hwa', 'thu', 'tho', 'the', 'thee',
|
||||
0xE0 => 'thi', 'tha', 'ttu', 'tto', 'tte', 'ttee', 'tti', 'tta', 'pu', 'po', 'pe', 'pee', 'pi', 'pa', 'p', 'gu',
|
||||
0xF0 => 'go', 'ge', 'gee', 'gi', 'ga', 'khu', 'kho', 'khe', 'khee', 'khi', 'kha', 'kku', 'kko', 'kke', 'kkee', 'kki',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'kka', 'kk', 'nu', 'no', 'ne', 'nee', 'ni', 'na', 'mu', 'mo', 'me', 'mee', 'mi', 'ma', 'yu', 'yo',
|
||||
0x10 => 'ye', 'yee', 'yi', 'ya', 'ju', 'ju', 'jo', 'je', 'jee', 'ji', 'ji', 'ja', 'jju', 'jjo', 'jje', 'jjee',
|
||||
0x20 => 'jji', 'jja', 'lu', 'lo', 'le', 'lee', 'li', 'la', 'dlu', 'dlo', 'dle', 'dlee', 'dli', 'dla', 'lhu', 'lho',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 't', 'd', 'b', 'b', 'p', 'p', 'e', 'm', 'm', 'm', 'l', 'l', 'ng', 'ng', 'd', 'o',
|
||||
0xE0 => 'ear', 'ior', 'qu', 'qu', 'qu', 's', 'yr', 'yr', 'yr', 'q', 'x', '.', ':', '+', '17', '18',
|
||||
0xF0 => '19', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x10 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x20 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => '', '', '', '', '.', ' // ', ':', '+', '++', ' * ', ' /// ', 'KR', '\'', NULL, NULL, NULL,
|
||||
0xE0 => '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => ' @ ', ' ... ', ',', '. ', ': ', ' // ', '', '-', ',', '. ', '', '', '', '', '', NULL,
|
||||
0x10 => '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x20 => 'a', 'e', 'i', 'o', 'u', 'O', 'U', 'ee', 'n', 'ng', 'b', 'p', 'q', 'g', 'm', 'l',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'A', 'AE', NULL, 'B', 'C', 'D', 'D', 'E', NULL, NULL, 'J', 'K', 'L', 'M', NULL, 'O',
|
||||
0x10 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'P', NULL, NULL, 'T', 'U', NULL, NULL, NULL,
|
||||
0x20 => 'V', 'W', 'Z', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'A', 'a', 'B', 'b', 'B', 'b', 'B', 'b', 'C', 'c', 'D', 'd', 'D', 'd', 'D', 'd',
|
||||
0x10 => 'D', 'd', 'D', 'd', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'F', 'f',
|
||||
0x20 => 'G', 'g', 'H', 'h', 'H', 'h', 'H', 'h', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o', 'O', 'o',
|
||||
0xE0 => 'O', 'o', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u',
|
||||
0xF0 => 'U', 'u', 'Y', 'y', 'Y', 'y', 'Y', 'y', 'Y', 'y', 'LL', 'll', 'V', 'v', 'Y', 'y',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A',
|
||||
0x10 => 'e', 'e', 'e', 'e', 'e', 'e', NULL, NULL, 'E', 'E', 'E', 'E', 'E', 'E', NULL, NULL,
|
||||
0x20 => 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'e', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'i', 'i', 'i', 'i', NULL, NULL, 'i', 'i', 'I', 'I', 'I', 'I', NULL, '`\'', '`\'', '`~',
|
||||
0xE0 => 'y', 'y', 'y', 'y', 'r', 'r', 'y', 'y', 'Y', 'Y', 'Y', 'Y', 'R', '"`', '"\'', '`',
|
||||
0xF0 => NULL, NULL, 'o', 'o', 'o', NULL, 'o', 'o', 'O', 'O', 'O', 'O', 'O', '\'', '`', NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '', '', '', '',
|
||||
0x10 => '-', '-', '-', '-', '-', '-', '||', '_', '\'', '\'', ',', '\'', '"', '"', ',,', '"',
|
||||
0x20 => '+', '++', '*', '*>', '.', '..', '...', '.', '
|
||||
|
@ -25,4 +25,4 @@ $base = array(
|
|||
0xD0 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
0xE0 => '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'a/c', 'a/s', 'C', '', '', 'c/o', 'c/u', '', '', '', 'g', 'H', 'x', 'H', 'h', '',
|
||||
0x10 => 'I', 'I', 'L', 'l', 'lb', 'N', 'No', '(p)', 'P', 'P', 'Q', 'R', 'R', 'R', 'Rx', '',
|
||||
0x20 => '(sm)', 'TEL', '(tm)', '', 'Z', '', 'O', 'mho', 'Z', '', 'K', 'A', 'B', 'C', 'e', 'e',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => '=', '|', '=', '|', '=', '|', '\\', '/', '\\', '/', '=', '=', '~', '~', '|', '|',
|
||||
0xE0 => '-', '|', '-', '|', '-', '-', '-', '|', '-', '|', '|', '|', '|', '|', '|', '|',
|
||||
0xF0 => '-', '\\', '\\', '|', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x10 => NULL, NULL, '-', NULL, NULL, '/', '\\', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x20 => NULL, NULL, NULL, '|', '|', '||', '||', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x10 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x20 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '<', '>', NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
0x10 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
0x20 => '', '', '', '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
0xE0 => '', '', '', '', '', '', '', '', '', '', '', NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => '-', '-', '|', '|', '-', '-', '|', '|', '-', '-', '|', '|', '+', '+', '+', '+',
|
||||
0x10 => '+', '+', '+', '+', '+', '+', '+', '+', '+', '+', '+', '+', '+', '+', '+', '+',
|
||||
0x20 => '+', '+', '+', '+', '+', '+', '+', '+', '+', '+', '+', '+', '+', '+', '+', '+',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*',
|
||||
0xE0 => '*', '*', '*', '*', '*', '*', '*', '#', '#', '#', '#', '#', '^', '^', '^', 'O',
|
||||
0xF0 => '#', '#', '#', '#', '#', '#', '#', '#', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
0x10 => '', '', '', '', NULL, NULL, NULL, NULL, NULL, '', '', '', '', '', '', '',
|
||||
0x20 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
0x10 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
0x20 => '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => ' ', 'a', '1', 'b', '\'', 'k', '2', 'l', '@', 'c', 'i', 'f', '/', 'm', 's', 'p',
|
||||
0x10 => '"', 'e', '3', 'h', '9', 'o', '6', 'r', '^', 'd', 'j', 'g', '>', 'n', 't', 'q',
|
||||
0x20 => ',', '*', '5', '<', '-', 'u', '8', 'v', '.', '%', '[', '$', '+', 'x', '!', '&',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => '[d578]', '[d1578]', '[d2578]', '[d12578]', '[d3578]', '[d13578]', '[d23578]', '[d123578]', '[d4578]', '[d14578]', '[d24578]', '[d124578]', '[d34578]', '[d134578]', '[d234578]', '[d1234578]',
|
||||
0xE0 => '[d678]', '[d1678]', '[d2678]', '[d12678]', '[d3678]', '[d13678]', '[d23678]', '[d123678]', '[d4678]', '[d14678]', '[d24678]', '[d124678]', '[d34678]', '[d134678]', '[d234678]', '[d1234678]',
|
||||
0xF0 => '[d5678]', '[d15678]', '[d25678]', '[d125678]', '[d35678]', '[d135678]', '[d235678]', '[d1235678]', '[d45678]', '[d145678]', '[d245678]', '[d1245678]', '[d345678]', '[d1345678]', '[d2345678]', '[d12345678]',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x10 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x20 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x10 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x20 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x10 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0x20 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'jin', 'chang', 'chang', 'zhang', 'men', NULL, 'fu', 'yu', 'qing', 'wei', 'ye', 'feng', 'fei', 'shi', NULL, 'shi',
|
||||
0xE0 => 'shi', NULL, 'ma', 'gu', 'gui', 'yu', 'niao', 'lu', 'mai', 'huang', 'mian', 'qi', 'qi', 'chi', 'chi', 'long',
|
||||
0xF0 => 'long', 'gui', 'gui', 'gui', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'yi', 'gun', 'zhu', 'pie', 'yi', 'jue', 'er', 'tou', 'ren', 'er', 'ru', 'ba', 'jiong', 'mi', 'bing', 'ji',
|
||||
0x10 => 'qian', 'dao', 'li', 'bao', 'bi', 'fang', 'xi', 'shi', 'bo', 'jie', 'chang', 'si', 'you', 'kou', 'wei', 'tu',
|
||||
0x20 => 'shi', 'zhi', 'sui', 'xi', 'da', 'nu', 'zi', 'mian', 'cun', 'xiao', 'you', 'shi', 'che', 'shan', 'chuan', 'gong',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'bi', 'qi', 'chi', 'long', 'gui', 'yue', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => ' ', ',', '.', '"', '[JIS]', '"', '/', 'ling', '<', '>', '<<', '>>', '[', '] ', '{', '} ',
|
||||
0x10 => '[(', ')] ', '@', 'X ', '[', ']', '[[', ']] ', '[', ']', '[', ']', '~ ', '"', '"', ',,',
|
||||
0x20 => '@', '1', '2', '3', '4', '5', '6', '7', '8', '9', '', '', '', '', '', '',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'ha', 'ha', 'hi', 'hi', 'hi', 'fu', 'fu', 'fu', 'he', 'he', 'he', 'ho', 'ho', 'ho', 'ma', 'mi',
|
||||
0xE0 => 'mu', 'me', 'mo', '~ya', 'ya', '~yu', 'yu', '~yo', 'yo', 'ra', 'ri', 'ru', 're', 'ro', '~wa', 'wa',
|
||||
0xF0 => 'wi', 'we', 'wo', 'n', 'u', '~ka', '~ke', 'wa', 'wi', 'we', 'wo', '', '', '"', '"', NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, NULL, NULL, NULL, NULL, 'b', 'p', 'm1', 'f', 'd', 't', 'n1', 'l', 'g', 'k', 'h',
|
||||
0x10 => 'j', 'q', 'x', 'zhi1', 'chi1', 'shi1', 'ri1', 'zi1', 'ci1', 'si1', 'a1', 'o1', 'e1', 'eh1', 'ai1', 'ei1',
|
||||
0x20 => 'ao1', 'ou1', 'an1', 'en1', 'ang1', 'eng1', 'er1', 'yi1', 'wu1', 'yu1', 'V', 'NG', 'GN', NULL, NULL, NULL,
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
0xF0 => NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => '(g)', '(n)', '(d)', '(l)', '(m)', '(b)', '(s)', '()', '(j)', '(ch)', '(k)', '(t)', '(p)', '(h)', '(ga)', '(na)',
|
||||
0x10 => '(da)', '(la)', '(ma)', '(ba)', '(sa)', '(a)', '(ja)', '(cha)', '(ka)', '(ta)', '(pa)', '(ha)', '(ju)', NULL, NULL, NULL,
|
||||
0x20 => '(1) ', '(2) ', '(3) ', '(4) ', '(5) ', '(6) ', '(7) ', '(8) ', '(9) ', '(10) ', '(Yue) ', '(Huo) ', '(Shui) ', '(Mu) ', '(Jin) ', '(Tu) ',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'a', 'i', 'u', 'u', 'o', 'ka', 'ki', 'ku', 'ke', 'ko', 'sa', 'si', 'su', 'se', 'so', 'ta',
|
||||
0xE0 => 'ti', 'tu', 'te', 'to', 'na', 'ni', 'nu', 'ne', 'no', 'ha', 'hi', 'hu', 'he', 'ho', 'ma', 'mi',
|
||||
0xF0 => 'mu', 'me', 'mo', 'ya', 'yu', 'yo', 'ra', 'ri', 'ru', 're', 'ro', 'wa', 'wi', 'we', 'wo', NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'apartment', 'alpha', 'ampere', 'are', 'inning', 'inch', 'won', 'escudo', 'acre', 'ounce', 'ohm', 'kai-ri', 'carat', 'calorie', 'gallon', 'gamma',
|
||||
0x10 => 'giga', 'guinea', 'curie', 'guilder', 'kilo', 'kilogram', 'kilometer', 'kilowatt', 'gram', 'gram ton', 'cruzeiro', 'krone', 'case', 'koruna', 'co-op', 'cycle',
|
||||
0x20 => 'centime', 'shilling', 'centi', 'cent', 'dozen', 'desi', 'dollar', 'ton', 'nano', 'knot', 'heights', 'percent', 'parts', 'barrel', 'piaster', 'picul',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'lm', 'ln', 'log', 'lx', 'mb', 'mil', 'mol', 'pH', 'p.m.', 'PPM', 'PR', 'sr', 'Sv', 'Wb', 'V/m', 'A/m',
|
||||
0xE0 => '1d', '2d', '3d', '4d', '5d', '6d', '7d', '8d', '9d', '10d', '11d', '12d', '13d', '14d', '15d', '16d',
|
||||
0xF0 => '17d', '18d', '19d', '20d', '21d', '22d', '23d', '24d', '25d', '26d', '27d', '28d', '29d', '30d', '31d', NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'qiu', 'tian', NULL, NULL, 'kua', 'wu', 'yin', NULL, NULL, NULL, NULL, NULL, 'yi', NULL, NULL, NULL,
|
||||
0x10 => NULL, NULL, NULL, NULL, NULL, NULL, 'xie', NULL, NULL, NULL, NULL, NULL, 'chou', NULL, NULL, NULL,
|
||||
0x20 => NULL, 'nuo', NULL, NULL, 'dan', NULL, NULL, NULL, 'xu', 'xing', NULL, 'xiong', 'liu', 'lin', 'xiang', 'yong',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'lu', 'xing', NULL, 'nan', 'xie', NULL, 'bi', 'jie', 'su', NULL, 'gong', NULL, 'you', 'xing', 'qia', 'pi',
|
||||
0xE0 => 'dian', 'fu', 'luo', 'qia', 'qia', 'tang', 'bai', 'gan', 'ci', 'xuan', 'lang', NULL, NULL, 'she', NULL, 'li',
|
||||
0xF0 => 'hua', 'tou', 'pian', 'di', 'ruan', 'e', 'qie', 'yi', 'zhuo', 'rui', 'jian', NULL, 'chi', 'chong', 'xi', NULL,
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'lue', 'deng', 'lin', 'jue', 'su', 'xiao', 'zan', NULL, NULL, 'zhu', 'zhan', 'jian', 'zou', 'chua', 'xie', 'li',
|
||||
0x10 => NULL, 'chi', 'xi', 'jian', NULL, 'ji', NULL, 'fei', 'chu', 'beng', 'jie', NULL, 'ba', 'liang', 'kuai', NULL,
|
||||
0x20 => 'xia', 'bie', 'jue', 'lei', 'xin', 'bai', 'yang', 'lu', 'bei', 'e', 'lu', NULL, NULL, 'che', 'nuo', 'xuan',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => NULL, 'bai', 'ai', 'zhui', 'qian', 'gou', 'dan', 'bei', 'bo', 'chu', 'li', 'xiao', 'xiu', NULL, NULL, NULL,
|
||||
0xE0 => NULL, NULL, 'hong', 'ti', 'cu', 'kuo', 'lao', 'zhi', 'xie', 'xi', NULL, 'qie', 'zha', 'xi', NULL, NULL,
|
||||
0xF0 => 'cong', 'ji', 'huo', 'ta', 'yan', 'xu', 'po', 'sai', NULL, NULL, NULL, 'guo', 'ye', 'xiang', 'xue', 'he',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'zuo', 'yi', 'ci', NULL, 'leng', 'xian', 'tai', 'rong', 'yi', 'zhi', 'xi', 'xian', 'ju', 'ji', 'han', NULL,
|
||||
0x10 => 'pao', 'li', NULL, 'lan', 'sai', 'han', 'yan', 'qu', NULL, 'yan', 'han', 'kan', 'chi', 'nie', 'huo', NULL,
|
||||
0x20 => 'bi', 'xia', 'weng', 'xuan', 'wan', 'you', 'qin', 'xu', 'nie', 'bi', 'hao', 'jing', 'ao', 'ao', NULL, NULL,
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'sou', 'can', 'dou', 'xi', 'feng', 'yi', 'suo', 'qie', 'po', 'xin', 'tong', 'xin', 'you', 'bei', 'long', NULL,
|
||||
0xE0 => NULL, NULL, NULL, 'yun', 'li', 'ta', 'lan', 'man', 'qiang', 'zhou', 'yan', 'xi', 'lu', 'xi', 'sao', 'fan',
|
||||
0xF0 => NULL, 'wei', 'fa', 'yi', 'nao', 'cheng', 'tan', 'ji', 'shu', 'pian', 'an', 'kua', 'cha', NULL, 'xian', 'zhi',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => NULL, NULL, 'feng', 'lian', 'xun', 'xu', 'mi', 'hui', 'mu', 'yong', 'zhan', 'yi', 'nou', 'tang', 'xi', 'yun',
|
||||
0x10 => 'shu', 'fu', 'yi', 'da', NULL, 'lian', 'cao', 'can', 'ju', 'lu', 'su', 'nen', 'ao', 'an', 'qian', NULL,
|
||||
0x20 => 'cui', 'cong', NULL, 'ran', 'nian', 'mai', 'xin', 'yue', 'nai', 'ao', 'shen', 'ma', NULL, NULL, 'lan', 'xi',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'mang', 'bo', 'qun', 'qi', 'han', NULL, 'long', NULL, 'tiao', 'ze', 'qi', 'zan', 'mi', 'pei', 'zhan', 'xiang',
|
||||
0xE0 => 'gang', NULL, 'qi', NULL, 'lu', NULL, 'yun', 'e', 'duan', 'min', 'wei', 'quan', 'sou', 'min', 'tu', NULL,
|
||||
0xF0 => 'ming', 'yao', 'jue', 'li', 'kuai', 'gang', 'yuan', 'da', NULL, 'lao', 'lou', 'qian', 'ao', 'biao', 'yong', 'mang',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Generic transliteration data for the PhpTransliteration class.
|
||||
*/
|
||||
|
||||
$base = array(
|
||||
$base = [
|
||||
0x00 => 'dao', NULL, 'ao', NULL, 'xi', 'fu', 'dan', 'jiu', 'run', 'tong', 'qu', 'e', 'qi', 'ji', 'ji', 'hua',
|
||||
0x10 => 'jiao', 'zui', 'biao', 'meng', 'bai', 'wei', 'yi', 'ao', 'yu', 'hao', 'dui', 'wo', 'ni', 'cuan', NULL, 'li',
|
||||
0x20 => 'lu', 'niao', 'huai', 'li', NULL, 'lu', 'feng', 'mi', 'yu', NULL, 'ju', NULL, NULL, 'zhan', 'peng', 'yi',
|
||||
|
@ -22,4 +22,4 @@ $base = array(
|
|||
0xD0 => 'bian', 'rong', 'ceng', 'can', 'ding', NULL, NULL, NULL, NULL, 'di', 'tong', 'ta', 'xing', 'song', 'duo', 'xi',
|
||||
0xE0 => 'tao', NULL, 'ti', 'shan', 'jian', 'zhi', 'wei', 'yin', NULL, NULL, 'huan', 'zhong', 'qi', 'zong', NULL, 'xie',
|
||||
0xF0 => 'xie', 'ze', 'wei', NULL, NULL, 'ta', 'zhan', 'ning', NULL, NULL, NULL, 'yi', 'ren', 'shu', 'cha', 'zhuo',
|
||||
);
|
||||
];
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue