Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation.

This commit is contained in:
Pantheon Automation 2015-11-17 13:42:33 -08:00 committed by Greg Anderson
parent 4afb23bbd3
commit 7784f4c23d
929 changed files with 19798 additions and 5304 deletions

View file

@ -66,8 +66,6 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter
/**
* {@inheritdoc}
*
* @api
*/
public function setLocale($locale)
{
@ -76,8 +74,6 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter
/**
* {@inheritdoc}
*
* @api
*/
public function getLocale()
{

View file

@ -15,8 +15,6 @@ namespace Symfony\Component\Translation\Exception;
* Exception interface for all exceptions thrown by the component.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
interface ExceptionInterface
{

View file

@ -15,8 +15,6 @@ namespace Symfony\Component\Translation\Exception;
* Thrown when a resource cannot be loaded.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class InvalidResourceException extends \InvalidArgumentException implements ExceptionInterface
{

View file

@ -15,8 +15,6 @@ namespace Symfony\Component\Translation\Exception;
* Thrown when a resource does not exist.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class NotFoundResourceException extends \InvalidArgumentException implements ExceptionInterface
{

View file

@ -15,8 +15,6 @@ namespace Symfony\Component\Translation;
* IdentityTranslator does not translate anything.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class IdentityTranslator implements TranslatorInterface
{
@ -27,8 +25,6 @@ class IdentityTranslator implements TranslatorInterface
* Constructor.
*
* @param MessageSelector|null $selector The message selector for pluralization
*
* @api
*/
public function __construct(MessageSelector $selector = null)
{
@ -37,8 +33,6 @@ class IdentityTranslator implements TranslatorInterface
/**
* {@inheritdoc}
*
* @api
*/
public function setLocale($locale)
{
@ -47,8 +41,6 @@ class IdentityTranslator implements TranslatorInterface
/**
* {@inheritdoc}
*
* @api
*/
public function getLocale()
{
@ -57,8 +49,6 @@ class IdentityTranslator implements TranslatorInterface
/**
* {@inheritdoc}
*
* @api
*/
public function trans($id, array $parameters = array(), $domain = null, $locale = null)
{
@ -67,8 +57,6 @@ class IdentityTranslator implements TranslatorInterface
/**
* {@inheritdoc}
*
* @api
*/
public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null)
{

View file

@ -17,15 +17,11 @@ use Symfony\Component\Translation\MessageCatalogue;
* ArrayLoader loads translations from a PHP array.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class ArrayLoader implements LoaderInterface
{
/**
* {@inheritdoc}
*
* @api
*/
public function load($resource, $locale, $domain = 'messages')
{

View file

@ -19,8 +19,6 @@ use Symfony\Component\Config\Resource\FileResource;
* CsvFileLoader loads translations from CSV files.
*
* @author Saša Stamenković <umpirsky@gmail.com>
*
* @api
*/
class CsvFileLoader extends ArrayLoader
{
@ -30,8 +28,6 @@ class CsvFileLoader extends ArrayLoader
/**
* {@inheritdoc}
*
* @api
*/
public function load($resource, $locale, $domain = 'messages')
{
@ -55,18 +51,8 @@ class CsvFileLoader extends ArrayLoader
$file->setCsvControl($this->delimiter, $this->enclosure, $this->escape);
foreach ($file as $data) {
if (substr($data[0], 0, 1) === '#') {
continue;
}
if (!isset($data[1])) {
continue;
}
if (count($data) == 2) {
if ('#' !== substr($data[0], 0, 1) && isset($data[1]) && 2 === count($data)) {
$messages[$data[0]] = $data[1];
} else {
continue;
}
}

View file

@ -19,8 +19,6 @@ use Symfony\Component\Translation\Exception\NotFoundResourceException;
* LoaderInterface is the interface implemented by all translation loaders.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
interface LoaderInterface
{
@ -33,8 +31,6 @@ interface LoaderInterface
*
* @return MessageCatalogue A MessageCatalogue instance
*
* @api
*
* @throws NotFoundResourceException when the resource cannot be found
* @throws InvalidResourceException when the resource cannot be loaded
*/

View file

@ -19,15 +19,11 @@ use Symfony\Component\Config\Resource\FileResource;
* PhpFileLoader loads translations from PHP files returning an array of translations.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class PhpFileLoader extends ArrayLoader
{
/**
* {@inheritdoc}
*
* @api
*/
public function load($resource, $locale, $domain = 'messages')
{

View file

@ -21,15 +21,11 @@ use Symfony\Component\Config\Resource\FileResource;
* QtFileLoader loads translations from QT Translations XML files.
*
* @author Benjamin Eberlei <kontakt@beberlei.de>
*
* @api
*/
class QtFileLoader implements LoaderInterface
{
/**
* {@inheritdoc}
*
* @api
*/
public function load($resource, $locale, $domain = 'messages')
{

View file

@ -21,15 +21,11 @@ use Symfony\Component\Config\Resource\FileResource;
* XliffFileLoader loads translations from XLIFF files.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class XliffFileLoader implements LoaderInterface
{
/**
* {@inheritdoc}
*
* @api
*/
public function load($resource, $locale, $domain = 'messages')
{

View file

@ -21,8 +21,6 @@ use Symfony\Component\Yaml\Exception\ParseException;
* YamlFileLoader loads translations from Yaml files.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class YamlFileLoader extends ArrayLoader
{
@ -30,8 +28,6 @@ class YamlFileLoader extends ArrayLoader
/**
* {@inheritdoc}
*
* @api
*/
public function load($resource, $locale, $domain = 'messages')
{

View file

@ -66,8 +66,6 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface
/**
* {@inheritdoc}
*
* @api
*/
public function setLocale($locale)
{
@ -76,8 +74,6 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface
/**
* {@inheritdoc}
*
* @api
*/
public function getLocale()
{

View file

@ -17,8 +17,6 @@ use Symfony\Component\Config\Resource\ResourceInterface;
* MessageCatalogue.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterface
{
@ -34,8 +32,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
*
* @param string $locale The locale
* @param array $messages An array of messages classified by domain
*
* @api
*/
public function __construct($locale, array $messages = array())
{
@ -45,8 +41,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function getLocale()
{
@ -55,8 +49,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function getDomains()
{
@ -65,8 +57,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function all($domain = null)
{
@ -79,8 +69,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function set($id, $translation, $domain = 'messages')
{
@ -89,8 +77,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function has($id, $domain = 'messages')
{
@ -115,8 +101,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function get($id, $domain = 'messages')
{
@ -133,8 +117,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function replace($messages, $domain = 'messages')
{
@ -145,8 +127,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function add($messages, $domain = 'messages')
{
@ -159,8 +139,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function addCatalogue(MessageCatalogueInterface $catalogue)
{
@ -184,8 +162,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function addFallbackCatalogue(MessageCatalogueInterface $catalogue)
{
@ -214,8 +190,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function getFallbackCatalogue()
{
@ -224,8 +198,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function getResources()
{
@ -234,8 +206,6 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
/**
* {@inheritdoc}
*
* @api
*/
public function addResource(ResourceInterface $resource)
{

View file

@ -17,8 +17,6 @@ use Symfony\Component\Config\Resource\ResourceInterface;
* MessageCatalogueInterface.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
interface MessageCatalogueInterface
{
@ -26,8 +24,6 @@ interface MessageCatalogueInterface
* Gets the catalogue locale.
*
* @return string The locale
*
* @api
*/
public function getLocale();
@ -35,8 +31,6 @@ interface MessageCatalogueInterface
* Gets the domains.
*
* @return array An array of domains
*
* @api
*/
public function getDomains();
@ -48,8 +42,6 @@ interface MessageCatalogueInterface
* @param string $domain The domain name
*
* @return array An array of messages
*
* @api
*/
public function all($domain = null);
@ -59,8 +51,6 @@ interface MessageCatalogueInterface
* @param string $id The message id
* @param string $translation The messages translation
* @param string $domain The domain name
*
* @api
*/
public function set($id, $translation, $domain = 'messages');
@ -71,8 +61,6 @@ interface MessageCatalogueInterface
* @param string $domain The domain name
*
* @return bool true if the message has a translation, false otherwise
*
* @api
*/
public function has($id, $domain = 'messages');
@ -83,8 +71,6 @@ interface MessageCatalogueInterface
* @param string $domain The domain name
*
* @return bool true if the message has a translation, false otherwise
*
* @api
*/
public function defines($id, $domain = 'messages');
@ -95,8 +81,6 @@ interface MessageCatalogueInterface
* @param string $domain The domain name
*
* @return string The message translation
*
* @api
*/
public function get($id, $domain = 'messages');
@ -105,8 +89,6 @@ interface MessageCatalogueInterface
*
* @param array $messages An array of translations
* @param string $domain The domain name
*
* @api
*/
public function replace($messages, $domain = 'messages');
@ -115,8 +97,6 @@ interface MessageCatalogueInterface
*
* @param array $messages An array of translations
* @param string $domain The domain name
*
* @api
*/
public function add($messages, $domain = 'messages');
@ -126,8 +106,6 @@ interface MessageCatalogueInterface
* The two catalogues must have the same locale.
*
* @param MessageCatalogueInterface $catalogue A MessageCatalogueInterface instance
*
* @api
*/
public function addCatalogue(MessageCatalogueInterface $catalogue);
@ -138,8 +116,6 @@ interface MessageCatalogueInterface
* This is used to provide default translations when they do not exist for the current locale.
*
* @param MessageCatalogueInterface $catalogue A MessageCatalogueInterface instance
*
* @api
*/
public function addFallbackCatalogue(MessageCatalogueInterface $catalogue);
@ -147,8 +123,6 @@ interface MessageCatalogueInterface
* Gets the fallback catalogue.
*
* @return MessageCatalogueInterface|null A MessageCatalogueInterface instance or null when no fallback has been set
*
* @api
*/
public function getFallbackCatalogue();
@ -156,8 +130,6 @@ interface MessageCatalogueInterface
* Returns an array of resources loaded to build this collection.
*
* @return ResourceInterface[] An array of resources
*
* @api
*/
public function getResources();
@ -165,8 +137,6 @@ interface MessageCatalogueInterface
* Adds a resource for this collection.
*
* @param ResourceInterface $resource A resource instance
*
* @api
*/
public function addResource(ResourceInterface $resource);
}

View file

@ -16,8 +16,6 @@ namespace Symfony\Component\Translation;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @api
*/
class MessageSelector
{
@ -46,8 +44,6 @@ class MessageSelector
* @return string
*
* @throws \InvalidArgumentException
*
* @api
*/
public function choose($message, $number, $locale)
{

View file

@ -189,8 +189,8 @@ class PluralizationRules
/**
* Overrides the default plural rule for a given locale.
*
* @param string $rule A PHP callable
* @param string $locale The locale
* @param callable $rule A PHP callable
* @param string $locale The locale
*
* @throws \LogicException
*/

View file

@ -21,8 +21,6 @@ use Symfony\Component\Config\ConfigCacheFactory;
* Translator.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class Translator implements TranslatorInterface, TranslatorBagInterface
{
@ -80,8 +78,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
* @param bool $debug Use cache in debug mode ?
*
* @throws \InvalidArgumentException If a locale contains invalid characters
*
* @api
*/
public function __construct($locale, MessageSelector $selector = null, $cacheDir = null, $debug = false)
{
@ -106,8 +102,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
*
* @param string $format The name of the loader (@see addResource())
* @param LoaderInterface $loader A LoaderInterface instance
*
* @api
*/
public function addLoader($format, LoaderInterface $loader)
{
@ -123,8 +117,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
* @param string $domain The domain
*
* @throws \InvalidArgumentException If the locale contains invalid characters
*
* @api
*/
public function addResource($format, $resource, $locale, $domain = null)
{
@ -145,8 +137,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
/**
* {@inheritdoc}
*
* @api
*/
public function setLocale($locale)
{
@ -156,8 +146,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
/**
* {@inheritdoc}
*
* @api
*/
public function getLocale()
{
@ -172,8 +160,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
* @throws \InvalidArgumentException If a locale contains invalid characters
*
* @deprecated since version 2.3, to be removed in 3.0. Use setFallbackLocales() instead.
*
* @api
*/
public function setFallbackLocale($locales)
{
@ -188,8 +174,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
* @param array $locales The fallback locales
*
* @throws \InvalidArgumentException If a locale contains invalid characters
*
* @api
*/
public function setFallbackLocales(array $locales)
{
@ -207,8 +191,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
* Gets the fallback locales.
*
* @return array $locales The fallback locales
*
* @api
*/
public function getFallbackLocales()
{
@ -217,8 +199,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
/**
* {@inheritdoc}
*
* @api
*/
public function trans($id, array $parameters = array(), $domain = null, $locale = null)
{
@ -231,8 +211,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
/**
* {@inheritdoc}
*
* @api
*/
public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null)
{

View file

@ -15,8 +15,6 @@ namespace Symfony\Component\Translation;
* TranslatorInterface.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
interface TranslatorInterface
{
@ -31,8 +29,6 @@ interface TranslatorInterface
* @throws \InvalidArgumentException If the locale contains invalid characters
*
* @return string The translated string
*
* @api
*/
public function trans($id, array $parameters = array(), $domain = null, $locale = null);
@ -48,8 +44,6 @@ interface TranslatorInterface
* @throws \InvalidArgumentException If the locale contains invalid characters
*
* @return string The translated string
*
* @api
*/
public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null);
@ -59,8 +53,6 @@ interface TranslatorInterface
* @param string $locale The locale
*
* @throws \InvalidArgumentException If the locale contains invalid characters
*
* @api
*/
public function setLocale($locale);
@ -68,8 +60,6 @@ interface TranslatorInterface
* Returns the current locale.
*
* @return string The locale
*
* @api
*/
public function getLocale();
}

View file

@ -19,7 +19,6 @@
"php": ">=5.3.9"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7",
"symfony/config": "~2.7",
"symfony/intl": "~2.4",
"symfony/yaml": "~2.2",