[DoctrineBridge] fixed some CS
This commit is contained in:
parent
f1ccc5278b
commit
e3421a0b1d
@ -81,6 +81,15 @@ class EntityChoiceList extends ArrayChoiceList
|
||||
|
||||
private $propertyPath;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param EntityManager $em An EntityManager instance
|
||||
* @param string $class The class name
|
||||
* @param string $property The property name
|
||||
* @param QueryBuilder|\Closure $queryBuilder An optional query builder
|
||||
* @param array|\Closure $choices An array of choices or a function returning an array
|
||||
*/
|
||||
public function __construct(EntityManager $em, $class, $property = null, $queryBuilder = null, $choices = array())
|
||||
{
|
||||
// If a query builder was passed, it must be a closure or QueryBuilder
|
||||
@ -113,7 +122,7 @@ class EntityChoiceList extends ArrayChoiceList
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the choices and returns them
|
||||
* Initializes the choices and returns them.
|
||||
*
|
||||
* If the entities were passed in the "choices" option, this method
|
||||
* does not have any significant overhead. Otherwise, if a query builder
|
||||
@ -144,7 +153,7 @@ class EntityChoiceList extends ArrayChoiceList
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert entities into choices with support for groups
|
||||
* Converts entities into choices with support for groups.
|
||||
*
|
||||
* The choices are generated from the entities. If the entities have a
|
||||
* composite identifier, the choices are indexed using ascending integers.
|
||||
@ -154,6 +163,8 @@ class EntityChoiceList extends ArrayChoiceList
|
||||
* is used as option values. Otherwise this method tries to convert
|
||||
* objects to strings using __toString().
|
||||
*
|
||||
* @param array $entities An array of entities
|
||||
* @param string $group A group name
|
||||
*/
|
||||
private function loadEntities($entities, $group = null)
|
||||
{
|
||||
@ -198,13 +209,18 @@ class EntityChoiceList extends ArrayChoiceList
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the fields of which the identifier of the underlying class consists.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getIdentifier()
|
||||
{
|
||||
return $this->identifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the according entities for the choices
|
||||
* Returns the according entities for the choices.
|
||||
*
|
||||
* If the choices were not initialized, they are initialized now. This
|
||||
* is an expensive operation, except if the entities were passed in the
|
||||
@ -222,7 +238,7 @@ class EntityChoiceList extends ArrayChoiceList
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the entity for the given key
|
||||
* Returns the entity for the given key.
|
||||
*
|
||||
* If the underlying entities have composite identifiers, the choices
|
||||
* are initialized. The key is expected to be the index in the choices
|
||||
@ -231,10 +247,11 @@ class EntityChoiceList extends ArrayChoiceList
|
||||
* If they have single identifiers, they are either fetched from the
|
||||
* internal entity cache (if filled) or loaded from the database.
|
||||
*
|
||||
* @param string $key The choice key (for entities with composite
|
||||
* identifiers) or entity ID (for entities with single
|
||||
* identifiers)
|
||||
* @return object The matching entity
|
||||
* @param string $key The choice key (for entities with composite
|
||||
* identifiers) or entity ID (for entities with single
|
||||
* identifiers)
|
||||
*
|
||||
* @return object The matching entity
|
||||
*/
|
||||
public function getEntity($key)
|
||||
{
|
||||
@ -265,11 +282,11 @@ class EntityChoiceList extends ArrayChoiceList
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the \ReflectionProperty instance for a property of the
|
||||
* underlying class
|
||||
* Returns the \ReflectionProperty instance for a property of the underlying class.
|
||||
*
|
||||
* @param string $property The name of the property
|
||||
* @return \ReflectionProperty The reflection instance
|
||||
* @param string $property The name of the property
|
||||
*
|
||||
* @return \ReflectionProperty The reflection instance
|
||||
*/
|
||||
private function getReflProperty($property)
|
||||
{
|
||||
@ -282,15 +299,17 @@ class EntityChoiceList extends ArrayChoiceList
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the values of the identifier fields of an entity
|
||||
* Returns the values of the identifier fields of an entity.
|
||||
*
|
||||
* Doctrine must know about this entity, that is, the entity must already
|
||||
* be persisted or added to the identity map before. Otherwise an
|
||||
* exception is thrown.
|
||||
*
|
||||
* @param object $entity The entity for which to get the identifier
|
||||
* @throws FormException If the entity does not exist in Doctrine's
|
||||
* identity map
|
||||
* @param object $entity The entity for which to get the identifier
|
||||
*
|
||||
* @return array The identifier values
|
||||
*
|
||||
* @throws FormException If the entity does not exist in Doctrine's identity map
|
||||
*/
|
||||
public function getIdentifierValues($entity)
|
||||
{
|
||||
|
@ -28,10 +28,10 @@ class EntitiesToArrayTransformer implements DataTransformerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms entities into choice keys
|
||||
* Transforms entities into choice keys.
|
||||
*
|
||||
* @param Collection|object $collection A collection of entities, a single entity or NULL
|
||||
*
|
||||
* @param Collection|object $collection A collection of entities, a single entity or
|
||||
* NULL
|
||||
* @return mixed An array of choice keys, a single key or NULL
|
||||
*/
|
||||
public function transform($collection)
|
||||
@ -66,11 +66,11 @@ class EntitiesToArrayTransformer implements DataTransformerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms choice keys into entities
|
||||
* Transforms choice keys into entities.
|
||||
*
|
||||
* @param mixed $keys An array of keys, a single key or NULL
|
||||
* @return Collection|object A collection of entities, a single entity
|
||||
* or NULL
|
||||
* @param mixed $keys An array of keys, a single key or NULL
|
||||
*
|
||||
* @return Collection|object A collection of entities, a single entity or NULL
|
||||
*/
|
||||
public function reverseTransform($keys)
|
||||
{
|
||||
|
@ -27,10 +27,10 @@ class EntityToIdTransformer implements DataTransformerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms entities into choice keys
|
||||
* Transforms entities into choice keys.
|
||||
*
|
||||
* @param Collection|object $entity A collection of entities, a single entity or NULL
|
||||
*
|
||||
* @param Collection|object $entity A collection of entities, a single entity or
|
||||
* NULL
|
||||
* @return mixed An array of choice keys, a single key or NULL
|
||||
*/
|
||||
public function transform($entity)
|
||||
@ -58,11 +58,11 @@ class EntityToIdTransformer implements DataTransformerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms choice keys into entities
|
||||
* Transforms choice keys into entities.
|
||||
*
|
||||
* @param mixed $key An array of keys, a single key or NULL
|
||||
* @return Collection|object A collection of entities, a single entity
|
||||
* or NULL
|
||||
*
|
||||
* @return Collection|object A collection of entities, a single entity or NULL
|
||||
*/
|
||||
public function reverseTransform($key)
|
||||
{
|
||||
|
@ -20,8 +20,9 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
*
|
||||
* This works with ORM, MongoDB and CouchDB instances of the collection interface.
|
||||
*
|
||||
* @see Doctrine\Common\Collections\Collection
|
||||
* @author Bernhard Schussek <bernhard.schussek@symfony-project.com>
|
||||
*
|
||||
* @see Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
class MergeCollectionListener implements EventSubscriberInterface
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ interface RegistryInterface
|
||||
* Gets the EntityRepository for an entity.
|
||||
*
|
||||
* @param string $entityName The name of the entity.
|
||||
* @param string $entityManagerNAme The entity manager name (null for the default one)
|
||||
* @param string $entityManagerName The entity manager name (null for the default one)
|
||||
*
|
||||
* @return Doctrine\ORM\EntityRepository
|
||||
*/
|
||||
|
@ -40,6 +40,7 @@ class UniqueEntityValidator extends ConstraintValidator
|
||||
/**
|
||||
* @param object $entity
|
||||
* @param Constraint $constraint
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid($entity, Constraint $constraint)
|
||||
|
@ -44,7 +44,7 @@ class FirePHPHandler extends BaseFirePHPHandler
|
||||
|
||||
if (!preg_match('{\bFirePHP/\d+\.\d+\b}', $event->getRequest()->headers->get('User-Agent'))
|
||||
&& !$event->getRequest()->headers->has('X-FirePHP-Version')) {
|
||||
|
||||
|
||||
$this->sendHeaders = false;
|
||||
$this->headers = array();
|
||||
|
||||
|
@ -12,8 +12,6 @@
|
||||
namespace Symfony\Bridge\Twig\Node;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class FormThemeNode extends \Twig_Node
|
||||
|
@ -12,8 +12,6 @@
|
||||
namespace Symfony\Bridge\Twig\Node;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class TransNode extends \Twig_Node
|
||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bridge\Twig\TokenParser;
|
||||
use Symfony\Bridge\Twig\Node\FormThemeNode;
|
||||
|
||||
/**
|
||||
*
|
||||
* Token Parser for the 'form_theme' tag.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bridge\Twig\TokenParser;
|
||||
use Symfony\Bridge\Twig\Node\TransNode;
|
||||
|
||||
/**
|
||||
*
|
||||
* Token Parser for the 'transchoice' tag.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bridge\Twig\TokenParser;
|
||||
use Symfony\Bridge\Twig\Node\TransNode;
|
||||
|
||||
/**
|
||||
*
|
||||
* Token Parser for the 'trans' tag.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -288,8 +288,9 @@ class DoctrineExtension extends AbstractDoctrineExtension
|
||||
* In the case of bundles everything is really optional (which leads to autodetection for this bundle) but
|
||||
* in the mappings key everything except alias is a required argument.
|
||||
*
|
||||
* @param array $entityManager A configured ORM entity manager.
|
||||
* @param ContainerBuilder $container A ContainerBuilder instance
|
||||
* @param array $entityManager A configured ORM entity manager
|
||||
* @param Definition $ormConfigDef A Definition instance
|
||||
* @param ContainerBuilder $container A ContainerBuilder instance
|
||||
*/
|
||||
protected function loadOrmEntityManagerMappingInformation(array $entityManager, Definition $ormConfigDef, ContainerBuilder $container)
|
||||
{
|
||||
|
@ -12,8 +12,6 @@
|
||||
namespace Symfony\Bundle\DoctrineBundle\Mapping;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class ClassMetadataCollection
|
||||
|
@ -12,8 +12,6 @@
|
||||
namespace Symfony\Bundle\DoctrineBundle\Mapping;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class DisconnectedMetadataFactory extends MetadataFactory
|
||||
|
@ -208,7 +208,7 @@ class Registry implements RegistryInterface
|
||||
* Gets the EntityRepository for an entity.
|
||||
*
|
||||
* @param string $entityName The name of the entity.
|
||||
* @param string $entityManagerNAme The entity manager name (null for the default one)
|
||||
* @param string $entityManagerName The entity manager name (null for the default one)
|
||||
*
|
||||
* @return Doctrine\ORM\EntityRepository
|
||||
*/
|
||||
|
@ -28,7 +28,6 @@ class XMLSchemaTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* @dataProvider dataValidateSchemaFiles
|
||||
* @param string $file
|
||||
*/
|
||||
public function testValidateSchema($file)
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ EOF
|
||||
$content = preg_replace($regex, '', $content);
|
||||
|
||||
// fix absolute paths to the cache directory
|
||||
$content = preg_replace('/'.preg_quote($warmupDir,'/').'/', preg_replace('/_new$/', '', $warmupDir), $content);
|
||||
$content = preg_replace('/'.preg_quote($warmupDir, '/').'/', preg_replace('/_new$/', '', $warmupDir), $content);
|
||||
|
||||
file_put_contents(preg_replace($regex, '', $file), $content);
|
||||
unlink($file);
|
||||
|
@ -200,6 +200,7 @@ EOF
|
||||
* Definition and Alias objects that those ids represent.
|
||||
*
|
||||
* @param string $serviceId The service id to resolve
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Definition|\Symfony\Component\DependencyInjection\Alias
|
||||
*/
|
||||
private function resolveServiceDefinition($serviceId)
|
||||
|
@ -33,7 +33,7 @@ class Controller extends ContainerAware
|
||||
/**
|
||||
* Generates a URL from the given parameters.
|
||||
*
|
||||
* @param string $name The name of the route
|
||||
* @param string $route The name of the route
|
||||
* @param mixed $parameters An array of parameters
|
||||
* @param Boolean $absolute Whether to generate an absolute URL
|
||||
*
|
||||
|
@ -38,8 +38,6 @@ class ControllerNameParser
|
||||
* Converts a short notation a:b:c to a class::method.
|
||||
*
|
||||
* @param string $controller A short notation controller (a:b:c)
|
||||
*
|
||||
* @param string A controller (class::method)
|
||||
*/
|
||||
public function parse($controller)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
|
||||
/**
|
||||
*
|
||||
* Redirects a request to another URL.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -19,6 +19,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Manages HTTP cache objects in a Container.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -18,7 +18,7 @@ use Symfony\Component\Form\Exception\FormException;
|
||||
use Symfony\Component\Form\Util\FormUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* FormHelper provides helpers to help display forms.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
|
||||
@ -68,8 +68,8 @@ class FormHelper extends Helper
|
||||
*
|
||||
* The theme format is "<Bundle>:<Controller>".
|
||||
*
|
||||
* @param FormView $view A FormView instance
|
||||
* @param string|array $resources A theme or an array of theme
|
||||
* @param FormView $view A FormView instance
|
||||
* @param string|array $themes A theme or an array of theme
|
||||
*/
|
||||
public function setTheme(FormView $view, $themes)
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ abstract class WebTestCase extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$dir = null;
|
||||
$reversedArgs = array_reverse($_SERVER['argv']);
|
||||
foreach ($reversedArgs as $argIndex=>$testArg) {
|
||||
foreach ($reversedArgs as $argIndex => $testArg) {
|
||||
if ($testArg === '-c' || $testArg === '--configuration') {
|
||||
$dir = realpath($reversedArgs[$argIndex - 1]);
|
||||
break;
|
||||
|
@ -52,32 +52,32 @@ class FormHelperDivLayoutTest extends AbstractDivLayoutTest
|
||||
|
||||
protected function renderEnctype(FormView $view)
|
||||
{
|
||||
return (string)$this->helper->enctype($view);
|
||||
return (string) $this->helper->enctype($view);
|
||||
}
|
||||
|
||||
protected function renderLabel(FormView $view, $label = null, array $vars = array())
|
||||
{
|
||||
return (string)$this->helper->label($view, $label, $vars);
|
||||
return (string) $this->helper->label($view, $label, $vars);
|
||||
}
|
||||
|
||||
protected function renderErrors(FormView $view)
|
||||
{
|
||||
return (string)$this->helper->errors($view);
|
||||
return (string) $this->helper->errors($view);
|
||||
}
|
||||
|
||||
protected function renderWidget(FormView $view, array $vars = array())
|
||||
{
|
||||
return (string)$this->helper->widget($view, $vars);
|
||||
return (string) $this->helper->widget($view, $vars);
|
||||
}
|
||||
|
||||
protected function renderRow(FormView $view, array $vars = array())
|
||||
{
|
||||
return (string)$this->helper->row($view, $vars);
|
||||
return (string) $this->helper->row($view, $vars);
|
||||
}
|
||||
|
||||
protected function renderRest(FormView $view, array $vars = array())
|
||||
{
|
||||
return (string)$this->helper->rest($view, $vars);
|
||||
return (string) $this->helper->rest($view, $vars);
|
||||
}
|
||||
|
||||
protected function setTheme(FormView $view, array $themes)
|
||||
|
@ -55,32 +55,32 @@ class FormHelperTableLayoutTest extends AbstractTableLayoutTest
|
||||
|
||||
protected function renderEnctype(FormView $view)
|
||||
{
|
||||
return (string)$this->helper->enctype($view);
|
||||
return (string) $this->helper->enctype($view);
|
||||
}
|
||||
|
||||
protected function renderLabel(FormView $view, $label = null, array $vars = array())
|
||||
{
|
||||
return (string)$this->helper->label($view, $label, $vars);
|
||||
return (string) $this->helper->label($view, $label, $vars);
|
||||
}
|
||||
|
||||
protected function renderErrors(FormView $view)
|
||||
{
|
||||
return (string)$this->helper->errors($view);
|
||||
return (string) $this->helper->errors($view);
|
||||
}
|
||||
|
||||
protected function renderWidget(FormView $view, array $vars = array())
|
||||
{
|
||||
return (string)$this->helper->widget($view, $vars);
|
||||
return (string) $this->helper->widget($view, $vars);
|
||||
}
|
||||
|
||||
protected function renderRow(FormView $view, array $vars = array())
|
||||
{
|
||||
return (string)$this->helper->row($view, $vars);
|
||||
return (string) $this->helper->row($view, $vars);
|
||||
}
|
||||
|
||||
protected function renderRest(FormView $view, array $vars = array())
|
||||
{
|
||||
return (string)$this->helper->rest($view, $vars);
|
||||
return (string) $this->helper->rest($view, $vars);
|
||||
}
|
||||
|
||||
protected function setTheme(FormView $view, array $themes)
|
||||
|
@ -31,7 +31,7 @@ class MonologExtension extends Extension
|
||||
/**
|
||||
* Loads the Monolog configuration.
|
||||
*
|
||||
* @param array $config An array of configuration settings
|
||||
* @param array $configs An array of configuration settings
|
||||
* @param ContainerBuilder $container A ContainerBuilder instance
|
||||
*/
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
|
@ -492,7 +492,7 @@ class SecurityExtension extends Extension
|
||||
|
||||
$container
|
||||
->setDefinition($userId, new DefinitionDecorator('security.user.provider.in_memory.user'))
|
||||
->setArguments(array($username, (string)$user['password'], $user['roles']))
|
||||
->setArguments(array($username, (string) $user['password'], $user['roles']))
|
||||
;
|
||||
|
||||
$definition->addMethodCall('createUser', array(new Reference($userId)));
|
||||
|
@ -14,6 +14,8 @@ namespace Symfony\Bundle\TwigBundle\Extension;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
/**
|
||||
* Twig extension for Symfony assets helper
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class AssetsExtension extends \Twig_Extension
|
||||
@ -39,7 +41,7 @@ class AssetsExtension extends \Twig_Extension
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the public path of an asset
|
||||
* Returns the public path of an asset.
|
||||
*
|
||||
* Absolute paths (i.e. http://...) are returned unmodified.
|
||||
*
|
||||
@ -54,9 +56,10 @@ class AssetsExtension extends \Twig_Extension
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the version of the assets in a package
|
||||
* Returns the version of the assets in a package.
|
||||
*
|
||||
* @param string $packageName
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getAssetsVersion($packageName = null)
|
||||
|
@ -14,6 +14,8 @@ namespace Symfony\Bundle\TwigBundle\Extension;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
/**
|
||||
* Twig extension for Symfony code helper
|
||||
*
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
@ -24,7 +26,7 @@ class CodeExtension extends \Twig_Extension
|
||||
/**
|
||||
* Constructor of Twig Extension to provide functions for code formatting
|
||||
*
|
||||
* @param Symfony\Bundle\FrameworkBundle\Templating\Helper\CodeHelper $helper Helper to use
|
||||
* @param ContainerInterface $container A ContainerInterface instance
|
||||
*/
|
||||
public function __construct(ContainerInterface $container)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bundle\TwigBundle\TokenParser;
|
||||
use Symfony\Bundle\TwigBundle\Node\RenderNode;
|
||||
|
||||
/**
|
||||
*
|
||||
* Token Parser for the render tag.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -194,6 +194,7 @@ class ProfilerController extends ContainerAware
|
||||
* Search results.
|
||||
*
|
||||
* @param string $token The token
|
||||
*
|
||||
* @return Response A Response instance
|
||||
*/
|
||||
public function searchResultsAction($token)
|
||||
|
@ -73,7 +73,7 @@ class ExceptionControllerTest extends TestCase
|
||||
$container->register('templating.helper.router', $this->getMockClass('Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\RouterHelper'))
|
||||
->addArgument(new Definition($this->getMockClass('Symfony\\Component\\Routing\\RouterInterface')));
|
||||
$container->register('twig', 'Twig_Environment');
|
||||
$container->register('templating.engine.twig',$this->getMockClass('Symfony\\Bundle\\TwigBundle\\TwigEngine'))
|
||||
$container->register('templating.engine.twig', $this->getMockClass('Symfony\\Bundle\\TwigBundle\\TwigEngine'))
|
||||
->addArgument($this->getMock('Twig_Environment'))
|
||||
->addArgument($this->getMock('Symfony\\Component\\Templating\\TemplateNameParserInterface'))
|
||||
->addArgument($this->getMock('Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables', array(), array($this->getMock('Symfony\\Component\\DependencyInjection\\Container'))));
|
||||
|
@ -124,6 +124,7 @@ abstract class Client
|
||||
*
|
||||
* @param string $key A key of the parameter to get
|
||||
* @param string $default A default value when key is undefined
|
||||
*
|
||||
* @return string A value of the parameter
|
||||
*/
|
||||
public function getServerParameter($key, $default = '')
|
||||
@ -347,9 +348,9 @@ abstract class Client
|
||||
/**
|
||||
* Creates a crawler.
|
||||
*
|
||||
* @param string $uri A uri
|
||||
* @param string $uri A uri
|
||||
* @param string $content Content for the crawler to use
|
||||
* @param string $type Content type
|
||||
* @param string $type Content type
|
||||
*
|
||||
* @return Crawler
|
||||
*/
|
||||
@ -432,6 +433,7 @@ abstract class Client
|
||||
* Takes a URI and converts it to absolute if it is not already absolute.
|
||||
*
|
||||
* @param string $uri A uri
|
||||
*
|
||||
* @return string An absolute uri
|
||||
*/
|
||||
protected function getAbsoluteUri($uri)
|
||||
|
@ -72,8 +72,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether false is allowed as value indicating that the array should
|
||||
* be unset.
|
||||
* Sets whether false is allowed as value indicating that the array should be unset.
|
||||
*
|
||||
* @param Boolean $allow
|
||||
*/
|
||||
@ -136,6 +135,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
||||
* Retrieves the default value.
|
||||
*
|
||||
* @return array The default value
|
||||
*
|
||||
* @throws \RuntimeException if the node has no default value
|
||||
*/
|
||||
public function getDefaultValue()
|
||||
@ -158,6 +158,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
||||
* Adds a child node.
|
||||
*
|
||||
* @param NodeInterface $node The child node to add
|
||||
*
|
||||
* @throws \InvalidArgumentException when the child node has no name
|
||||
* @throws \InvalidArgumentException when the child node's name is not unique
|
||||
*/
|
||||
@ -178,7 +179,9 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
||||
* Finalizes the value of this node.
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return mixed The finalised value
|
||||
*
|
||||
* @throws UnsetKeyException
|
||||
* @throws InvalidConfigurationException if the node doesn't have enough children
|
||||
*/
|
||||
@ -220,6 +223,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
||||
* Validates the type of the value.
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @throws InvalidTypeException
|
||||
*/
|
||||
protected function validateType($value)
|
||||
@ -240,6 +244,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
||||
* Normalizes the value.
|
||||
*
|
||||
* @param mixed $value The value to normalize
|
||||
*
|
||||
* @return mixed The normalized value
|
||||
*/
|
||||
protected function normalizeValue($value)
|
||||
@ -271,9 +276,10 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Remap multiple singular values to a single plural value
|
||||
* Remaps multiple singular values to a single plural value.
|
||||
*
|
||||
* @param array $value The source values
|
||||
*
|
||||
* @return array The remapped values
|
||||
*/
|
||||
protected function remapXml($value)
|
||||
@ -297,7 +303,9 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
||||
*
|
||||
* @param mixed $leftSide The left side to merge.
|
||||
* @param mixed $rightSide The right side to merge.
|
||||
*
|
||||
* @return mixed The merged values
|
||||
*
|
||||
* @throws InvalidConfigurationException
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
|
@ -35,6 +35,7 @@ abstract class BaseNode implements NodeInterface
|
||||
*
|
||||
* @param string $name The name of the node
|
||||
* @param NodeInterface $parent The parent of this node
|
||||
*
|
||||
* @throws \InvalidArgumentException if the name contains a period.
|
||||
*/
|
||||
public function __construct($name, NodeInterface $parent = null)
|
||||
@ -144,7 +145,9 @@ abstract class BaseNode implements NodeInterface
|
||||
*
|
||||
* @param mixed $leftSide
|
||||
* @param mixed $rightSide
|
||||
*
|
||||
* @return mixed The merged value
|
||||
*
|
||||
* @throws ForbiddenOverwriteException
|
||||
*/
|
||||
public final function merge($leftSide, $rightSide)
|
||||
@ -196,6 +199,7 @@ abstract class BaseNode implements NodeInterface
|
||||
* Finalizes a value, applying all finalization closures.
|
||||
*
|
||||
* @param mixed $value The value to finalize
|
||||
*
|
||||
* @return mixed The finalized value
|
||||
*/
|
||||
public final function finalize($value)
|
||||
@ -227,6 +231,7 @@ abstract class BaseNode implements NodeInterface
|
||||
* Validates the type of a Node.
|
||||
*
|
||||
* @param mixed $value The value to validate
|
||||
*
|
||||
* @throws InvalidTypeException when the value is invalid
|
||||
*/
|
||||
abstract protected function validateType($value);
|
||||
@ -235,23 +240,26 @@ abstract class BaseNode implements NodeInterface
|
||||
* Normalizes the value.
|
||||
*
|
||||
* @param mixed $value The value to normalize.
|
||||
*
|
||||
* @return mixed The normalized value
|
||||
*/
|
||||
abstract protected function normalizeValue($value);
|
||||
|
||||
/**
|
||||
* Merges two values together
|
||||
* Merges two values together.
|
||||
*
|
||||
* @param mixed $leftSide
|
||||
* @param mixed $rightSide
|
||||
*
|
||||
* @return mixed The merged value
|
||||
*/
|
||||
abstract protected function mergeValues($leftSide, $rightSide);
|
||||
|
||||
/**
|
||||
* Finalizes a value
|
||||
* Finalizes a value.
|
||||
*
|
||||
* @param mixed $value The value to finalize
|
||||
*
|
||||
* @return mixed The finalized value
|
||||
*/
|
||||
abstract protected function finalizeValue($value);
|
||||
|
@ -56,6 +56,7 @@ class ExprBuilder
|
||||
* The default one tests if the value is true.
|
||||
*
|
||||
* @param \Closure $closure
|
||||
*
|
||||
* @return ExprBuilder
|
||||
*/
|
||||
public function ifTrue(\Closure $closure = null)
|
||||
|
@ -38,6 +38,7 @@ class MergeBuilder
|
||||
* Sets whether the node can be unset.
|
||||
*
|
||||
* @param Boolean $allow
|
||||
*
|
||||
* @return MergeBuilder
|
||||
*/
|
||||
public function allowUnset($allow = true)
|
||||
|
@ -61,6 +61,7 @@ interface NodeInterface
|
||||
* Normalizes the supplied value.
|
||||
*
|
||||
* @param mixed $value The value to normalize
|
||||
*
|
||||
* @return mixed The normalized value
|
||||
*/
|
||||
function normalize($value);
|
||||
@ -70,6 +71,7 @@ interface NodeInterface
|
||||
*
|
||||
* @param mixed $leftSide
|
||||
* @param mixed $rightSide
|
||||
*
|
||||
* @return mixed The merged values
|
||||
*/
|
||||
function merge($leftSide, $rightSide);
|
||||
@ -78,6 +80,7 @@ interface NodeInterface
|
||||
* Finalizes a value.
|
||||
*
|
||||
* @param mixed $value The value to finalize
|
||||
*
|
||||
* @return mixed The finalized value
|
||||
*/
|
||||
function finalize($value);
|
||||
|
@ -82,6 +82,7 @@ class PrototypedArrayNode extends ArrayNode
|
||||
* Sets the default value of this node.
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @throws \InvalidArgumentException if the default value is not an array
|
||||
*/
|
||||
public function setDefaultValue($value)
|
||||
@ -127,6 +128,7 @@ class PrototypedArrayNode extends ArrayNode
|
||||
* Disable adding concrete children for prototyped nodes.
|
||||
*
|
||||
* @param NodeInterface $node The child node to add
|
||||
*
|
||||
* @throws \RuntimeException Prototyped array nodes can't have concrete children.
|
||||
*/
|
||||
public function addChild(NodeInterface $node)
|
||||
@ -138,7 +140,9 @@ class PrototypedArrayNode extends ArrayNode
|
||||
* Finalizes the value of this node.
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return mixed The finalised value
|
||||
*
|
||||
* @throws UnsetKeyException
|
||||
* @throws InvalidConfigurationException if the node doesn't have enough children
|
||||
*/
|
||||
@ -173,6 +177,7 @@ class PrototypedArrayNode extends ArrayNode
|
||||
* Normalizes the value.
|
||||
*
|
||||
* @param mixed $value The value to normalize
|
||||
*
|
||||
* @return mixed The normalized value
|
||||
*/
|
||||
protected function normalizeValue($value)
|
||||
@ -231,7 +236,9 @@ class PrototypedArrayNode extends ArrayNode
|
||||
*
|
||||
* @param mixed $leftSide The left side to merge.
|
||||
* @param mixed $rightSide The right side to merge.
|
||||
*
|
||||
* @return mixed The merged values
|
||||
*
|
||||
* @throws InvalidConfigurationException
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
|
@ -33,8 +33,8 @@ namespace Symfony\Component\Console\Input;
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
|
||||
* @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02
|
||||
* @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
|
||||
* @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
@ -283,6 +283,7 @@ class ArgvInput extends Input
|
||||
*
|
||||
* @param string|array $values The value(s) to look for in the raw parameters (can be an array)
|
||||
* @param mixed $default The default value to return if no result is found
|
||||
*
|
||||
* @return mixed The option value
|
||||
*/
|
||||
public function getParameterOption($values, $default = false)
|
||||
|
@ -77,6 +77,7 @@ interface InputInterface
|
||||
* Get argument by name.
|
||||
*
|
||||
* @param string $name The name of the argument
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function getArgument($name);
|
||||
@ -90,6 +91,7 @@ interface InputInterface
|
||||
* Get an option by name.
|
||||
*
|
||||
* @param string $name The name of the option
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function getOption($name);
|
||||
|
@ -46,6 +46,7 @@ class StringInput extends ArgvInput
|
||||
* Tokenizes a string.
|
||||
*
|
||||
* @param string $input The input to tokenize
|
||||
*
|
||||
* @throws \InvalidArgumentException When unable to parse input (should never happen)
|
||||
*/
|
||||
private function tokenize($input)
|
||||
|
@ -80,6 +80,7 @@ class FunctionNode implements NodeInterface
|
||||
* @param mixed $expr
|
||||
* @param Boolean $last
|
||||
* @param Boolean $addNameTest
|
||||
*
|
||||
* @return XPathExpr
|
||||
*/
|
||||
protected function _xpath_nth_child($xpath, $expr, $last = false, $addNameTest = true)
|
||||
@ -150,6 +151,7 @@ class FunctionNode implements NodeInterface
|
||||
*
|
||||
* @param XPathExpr $xpath
|
||||
* @param XPathExpr $expr
|
||||
*
|
||||
* @return XPathExpr
|
||||
*/
|
||||
protected function _xpath_nth_last_child($xpath, $expr)
|
||||
@ -162,6 +164,7 @@ class FunctionNode implements NodeInterface
|
||||
*
|
||||
* @param XPathExpr $xpath
|
||||
* @param XPathExpr $expr
|
||||
*
|
||||
* @return XPathExpr
|
||||
*/
|
||||
protected function _xpath_nth_of_type($xpath, $expr)
|
||||
@ -178,6 +181,7 @@ class FunctionNode implements NodeInterface
|
||||
*
|
||||
* @param XPathExpr $xpath
|
||||
* @param XPathExpr $expr
|
||||
*
|
||||
* @return XPathExpr
|
||||
*/
|
||||
protected function _xpath_nth_last_of_type($xpath, $expr)
|
||||
@ -190,6 +194,7 @@ class FunctionNode implements NodeInterface
|
||||
*
|
||||
* @param XPathExpr $xpath
|
||||
* @param XPathExpr $expr
|
||||
*
|
||||
* @return XPathExpr
|
||||
*/
|
||||
protected function _xpath_contains($xpath, $expr)
|
||||
@ -213,6 +218,7 @@ class FunctionNode implements NodeInterface
|
||||
*
|
||||
* @param XPathExpr $xpath
|
||||
* @param XPathExpr $expr
|
||||
*
|
||||
* @return XPathExpr
|
||||
*/
|
||||
protected function _xpath_not($xpath, $expr)
|
||||
@ -230,6 +236,7 @@ class FunctionNode implements NodeInterface
|
||||
* Parses things like '1n+2', or 'an+b' generally, returning (a, b)
|
||||
*
|
||||
* @param mixed $s
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function parseSeries($s)
|
||||
|
@ -39,6 +39,7 @@ class PseudoNode implements NodeInterface
|
||||
* @param NodeInterface $element The NodeInterface element
|
||||
* @param string $type Node type
|
||||
* @param string $ident The ident
|
||||
*
|
||||
* @throws ParseException When incorrect PseudoNode type is given
|
||||
*/
|
||||
public function __construct($element, $type, $ident)
|
||||
@ -81,8 +82,8 @@ class PseudoNode implements NodeInterface
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param XPathExpr $xpath The XPath expression
|
||||
*
|
||||
* @return XPathExpr The modified XPath expression
|
||||
*/
|
||||
protected function xpath_checked($xpath)
|
||||
@ -95,7 +96,9 @@ class PseudoNode implements NodeInterface
|
||||
|
||||
/**
|
||||
* @param XPathExpr $xpath The XPath expression
|
||||
*
|
||||
* @return XPathExpr The modified XPath expression
|
||||
*
|
||||
* @throws ParseException If this element is the root element
|
||||
*/
|
||||
protected function xpath_root($xpath)
|
||||
@ -108,6 +111,7 @@ class PseudoNode implements NodeInterface
|
||||
* Marks this XPath expression as the first child.
|
||||
*
|
||||
* @param XPathExpr $xpath The XPath expression
|
||||
*
|
||||
* @return XPathExpr The modified expression
|
||||
*/
|
||||
protected function xpath_first_child($xpath)
|
||||
@ -123,6 +127,7 @@ class PseudoNode implements NodeInterface
|
||||
* Sets the XPath to be the last child.
|
||||
*
|
||||
* @param XPathExpr $xpath The XPath expression
|
||||
*
|
||||
* @return XPathExpr The modified expression
|
||||
*/
|
||||
protected function xpath_last_child($xpath)
|
||||
@ -138,6 +143,7 @@ class PseudoNode implements NodeInterface
|
||||
* Sets the XPath expression to be the first of type.
|
||||
*
|
||||
* @param XPathExpr $xpath The XPath expression
|
||||
*
|
||||
* @return XPathExpr The modified expression
|
||||
*/
|
||||
protected function xpath_first_of_type($xpath)
|
||||
@ -155,7 +161,9 @@ class PseudoNode implements NodeInterface
|
||||
* Sets the XPath expression to be the last of type.
|
||||
*
|
||||
* @param XPathExpr $xpath The XPath expression
|
||||
*
|
||||
* @return XPathExpr The modified expression
|
||||
*
|
||||
* @throws ParseException Because *:last-of-type is not implemented
|
||||
*/
|
||||
protected function xpath_last_of_type($xpath)
|
||||
@ -173,6 +181,7 @@ class PseudoNode implements NodeInterface
|
||||
* Sets the XPath expression to be the only child.
|
||||
*
|
||||
* @param XPathExpr $xpath The XPath expression
|
||||
*
|
||||
* @return XPathExpr The modified expression
|
||||
*/
|
||||
protected function xpath_only_child($xpath)
|
||||
@ -188,7 +197,9 @@ class PseudoNode implements NodeInterface
|
||||
* Sets the XPath expression to be only of type.
|
||||
*
|
||||
* @param XPathExpr $xpath The XPath expression
|
||||
*
|
||||
* @return XPathExpr The modified expression
|
||||
*
|
||||
* @throws ParseException Because *:only-of-type is not implemented
|
||||
*/
|
||||
protected function xpath_only_of_type($xpath)
|
||||
@ -205,6 +216,7 @@ class PseudoNode implements NodeInterface
|
||||
* undocumented function
|
||||
*
|
||||
* @param XPathExpr $xpath The XPath expression
|
||||
*
|
||||
* @return XPathExpr The modified expression
|
||||
*/
|
||||
protected function xpath_empty($xpath)
|
||||
|
@ -46,7 +46,8 @@ class AnalyzeServiceReferencesPass implements RepeatablePassInterface
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setRepeatedPass(RepeatedPass $repeatedPass) {
|
||||
public function setRepeatedPass(RepeatedPass $repeatedPass)
|
||||
{
|
||||
$this->repeatedPass = $repeatedPass;
|
||||
}
|
||||
|
||||
@ -111,6 +112,7 @@ class AnalyzeServiceReferencesPass implements RepeatablePassInterface
|
||||
* Returns a service definition given the full name or an alias.
|
||||
*
|
||||
* @param string $id A full id or alias for a service definition.
|
||||
*
|
||||
* @return Definition The definition related to the supplied id
|
||||
*/
|
||||
private function getDefinition($id)
|
||||
|
@ -50,6 +50,7 @@ class CheckCircularReferencesPass implements CompilerPassInterface
|
||||
* Checks for circular references.
|
||||
*
|
||||
* @param array $edges An array of Nodes
|
||||
*
|
||||
* @throws \RuntimeException When a circular reference is found.
|
||||
*/
|
||||
private function checkOutEdges(array $edges)
|
||||
|
@ -33,6 +33,7 @@ class CheckDefinitionValidityPass implements CompilerPassInterface
|
||||
* Processes the ContainerBuilder to validate the Definition.
|
||||
*
|
||||
* @param ContainerBuilder $container
|
||||
*
|
||||
* @throws \RuntimeException When the Definition is invalid
|
||||
*/
|
||||
public function process(ContainerBuilder $container)
|
||||
|
@ -85,6 +85,7 @@ class CheckReferenceValidityPass implements CompilerPassInterface
|
||||
* Validates an array of References.
|
||||
*
|
||||
* @param array $arguments An array of Reference objects
|
||||
*
|
||||
* @throws \RuntimeException when there is a reference to an abstract definition.
|
||||
*/
|
||||
private function validateReferences(array $arguments)
|
||||
@ -114,6 +115,7 @@ class CheckReferenceValidityPass implements CompilerPassInterface
|
||||
*
|
||||
* @param Reference $reference
|
||||
* @param Definition $definition
|
||||
*
|
||||
* @throws \RuntimeException when there is an issue with the Reference scope
|
||||
*/
|
||||
private function validateScope(Reference $reference, Definition $definition = null)
|
||||
@ -149,6 +151,7 @@ class CheckReferenceValidityPass implements CompilerPassInterface
|
||||
* Returns the Definition given an id.
|
||||
*
|
||||
* @param string $id Definition identifier
|
||||
*
|
||||
* @return Definition
|
||||
*/
|
||||
private function getDefinition($id)
|
||||
|
@ -26,6 +26,7 @@ interface CompilerPassInterface
|
||||
* You can modify the container here before it is dumped to PHP code.
|
||||
*
|
||||
* @param ContainerBuilder $container
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @api
|
||||
|
@ -106,6 +106,7 @@ class InlineServiceDefinitionsPass implements RepeatablePassInterface
|
||||
* @param ContainerBuilder $container
|
||||
* @param string $id
|
||||
* @param Definition $definition
|
||||
*
|
||||
* @return Boolean If the definition is inlineable
|
||||
*/
|
||||
private function isInlinableDefinition(ContainerBuilder $container, $id, Definition $definition)
|
||||
|
@ -95,6 +95,7 @@ class PassConfig
|
||||
*
|
||||
* @param CompilerPassInterface $pass A Compiler pass
|
||||
* @param string $type The pass type
|
||||
*
|
||||
* @throws \InvalidArgumentException when a pass type doesn't exist
|
||||
*
|
||||
* @api
|
||||
|
@ -34,6 +34,7 @@ class RemoveUnusedDefinitionsPass implements RepeatablePassInterface
|
||||
* Processes the ContainerBuilder to remove unused definitions.
|
||||
*
|
||||
* @param ContainerBuilder $container
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function process(ContainerBuilder $container)
|
||||
|
@ -55,6 +55,7 @@ class ResolveDefinitionTemplatesPass implements CompilerPassInterface
|
||||
*
|
||||
* @param string $id The definition identifier
|
||||
* @param DefinitionDecorator $definition
|
||||
*
|
||||
* @return Definition
|
||||
*/
|
||||
private function resolveDefinition($id, DefinitionDecorator $definition)
|
||||
|
@ -52,9 +52,10 @@ class ResolveReferencesToAliasesPass implements CompilerPassInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the arguments to replace aliases
|
||||
* Processes the arguments to replace aliases.
|
||||
*
|
||||
* @param array $arguments An array of References
|
||||
*
|
||||
* @return array An array of References
|
||||
*/
|
||||
private function processArguments(array $arguments)
|
||||
@ -75,9 +76,10 @@ class ResolveReferencesToAliasesPass implements CompilerPassInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve an alias into a definition id
|
||||
* Resolves an alias into a definition id.
|
||||
*
|
||||
* @param string $id The definition or alias id to resolve
|
||||
*
|
||||
* @return string The definition id with aliases resolved
|
||||
*/
|
||||
private function getDefinitionId($id)
|
||||
|
@ -45,7 +45,9 @@ class ServiceReferenceGraph
|
||||
* Gets a node by identifier.
|
||||
*
|
||||
* @param string $id The id to retrieve
|
||||
*
|
||||
* @return ServiceReferenceGraphNode The node matching the supplied identifier
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function getNode($id)
|
||||
@ -99,6 +101,7 @@ class ServiceReferenceGraph
|
||||
*
|
||||
* @param string $id
|
||||
* @param string $value
|
||||
*
|
||||
* @return ServiceReferenceGraphNode
|
||||
*/
|
||||
private function createNode($id, $value)
|
||||
|
@ -286,6 +286,7 @@ class Container implements ContainerInterface
|
||||
* This is called when you enter a scope
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @api
|
||||
@ -331,7 +332,9 @@ class Container implements ContainerInterface
|
||||
* scope.
|
||||
*
|
||||
* @param string $name The name of the scope to leave
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \InvalidArgumentException if the scope is not active
|
||||
*
|
||||
* @api
|
||||
@ -370,6 +373,7 @@ class Container implements ContainerInterface
|
||||
* Adds a scope to the container.
|
||||
*
|
||||
* @param ScopeInterface $scope
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @api
|
||||
@ -403,6 +407,7 @@ class Container implements ContainerInterface
|
||||
* Returns whether this container has a certain scope
|
||||
*
|
||||
* @param string $name The name of the scope
|
||||
*
|
||||
* @return Boolean
|
||||
*
|
||||
* @api
|
||||
@ -418,6 +423,7 @@ class Container implements ContainerInterface
|
||||
* This does not actually check if the passed scope actually exists.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return Boolean
|
||||
*
|
||||
* @api
|
||||
@ -431,6 +437,7 @@ class Container implements ContainerInterface
|
||||
* Camelizes a string.
|
||||
*
|
||||
* @param string $id A string to camelize
|
||||
*
|
||||
* @return string The camelized string
|
||||
*/
|
||||
static public function camelize($id)
|
||||
@ -442,6 +449,7 @@ class Container implements ContainerInterface
|
||||
* A string to underscore.
|
||||
*
|
||||
* @param string $id The string to underscore
|
||||
*
|
||||
* @return string The underscored string
|
||||
*/
|
||||
static public function underscore($id)
|
||||
|
@ -90,6 +90,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
||||
* Checks if we have an extension.
|
||||
*
|
||||
* @param string $name The name of the extension
|
||||
*
|
||||
* @return Boolean If the extension exists
|
||||
*
|
||||
* @api
|
||||
@ -361,6 +362,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
||||
* constructor.
|
||||
*
|
||||
* @param ContainerBuilder $container The ContainerBuilder instance to merge.
|
||||
*
|
||||
* @throws \LogicException when this ContainerBuilder is frozen
|
||||
*
|
||||
* @api
|
||||
@ -832,6 +834,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
||||
* Returns the Service Conditionals.
|
||||
*
|
||||
* @param mixed $value An array of conditionals to return.
|
||||
*
|
||||
* @return array An array of Service conditionals
|
||||
*/
|
||||
static public function getServiceConditionals($value)
|
||||
|
@ -103,6 +103,7 @@ interface ContainerInterface
|
||||
* Enters the given scope
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @api
|
||||
@ -113,6 +114,7 @@ interface ContainerInterface
|
||||
* Leaves the current scope, and re-enters the parent scope
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @api
|
||||
@ -123,6 +125,7 @@ interface ContainerInterface
|
||||
* Adds a scope to the container
|
||||
*
|
||||
* @param ScopeInterface $scope
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @api
|
||||
@ -133,6 +136,7 @@ interface ContainerInterface
|
||||
* Whether this container has the given scope
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return Boolean
|
||||
*
|
||||
* @api
|
||||
@ -145,6 +149,7 @@ interface ContainerInterface
|
||||
* It does however not check if the scope actually exists.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return Boolean
|
||||
*
|
||||
* @api
|
||||
|
@ -524,6 +524,7 @@ class Definition
|
||||
* Sets the visibility of this service.
|
||||
*
|
||||
* @param Boolean $boolean
|
||||
*
|
||||
* @return Definition The current instance
|
||||
*
|
||||
* @api
|
||||
|
@ -123,6 +123,7 @@ class GraphvizDumper extends Dumper
|
||||
* @param array $arguments An array of arguments
|
||||
* @param Boolean $required
|
||||
* @param string $name
|
||||
*
|
||||
* @return array An array of edges
|
||||
*/
|
||||
private function findEdges($id, $arguments, $required, $name)
|
||||
@ -209,6 +210,7 @@ class GraphvizDumper extends Dumper
|
||||
* Adds attributes
|
||||
*
|
||||
* @param array $attributes An array of attributes
|
||||
*
|
||||
* @return string A comma separated list of attributes
|
||||
*/
|
||||
private function addAttributes($attributes)
|
||||
@ -242,6 +244,7 @@ class GraphvizDumper extends Dumper
|
||||
* Dotizes an identifier.
|
||||
*
|
||||
* @param string $id The identifier to dotize
|
||||
*
|
||||
* @return string A dotized string
|
||||
*/
|
||||
private function dotize($id)
|
||||
@ -253,6 +256,7 @@ class GraphvizDumper extends Dumper
|
||||
* Compiles an array of aliases for a specified service id.
|
||||
*
|
||||
* @param string $id A service id
|
||||
*
|
||||
* @return array An array of aliases
|
||||
*/
|
||||
private function getAliases($id)
|
||||
|
@ -103,6 +103,7 @@ class PhpDumper extends Dumper
|
||||
*
|
||||
* @param string $cId
|
||||
* @param string $definition
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function addServiceLocalTempVariables($cId, $definition)
|
||||
@ -151,6 +152,7 @@ class PhpDumper extends Dumper
|
||||
*
|
||||
* @param string $id The service id
|
||||
* @param Definition $definition
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function addServiceInclude($id, $definition)
|
||||
@ -180,6 +182,7 @@ class PhpDumper extends Dumper
|
||||
*
|
||||
* @param string $id
|
||||
* @param Definition $definition
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function addServiceInlinedDefinitions($id, $definition)
|
||||
@ -258,6 +261,7 @@ class PhpDumper extends Dumper
|
||||
*
|
||||
* @param string $id Service id
|
||||
* @param Definition $definition
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function addServiceReturn($id, $definition)
|
||||
@ -274,6 +278,7 @@ class PhpDumper extends Dumper
|
||||
*
|
||||
* @param string $id
|
||||
* @param Definition $definition
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@ -336,6 +341,7 @@ class PhpDumper extends Dumper
|
||||
*
|
||||
* @param string $id
|
||||
* @param Definition $definition
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
private function isSimpleInstance($id, $definition)
|
||||
@ -359,6 +365,7 @@ class PhpDumper extends Dumper
|
||||
* @param string $id
|
||||
* @param Definition $definition
|
||||
* @param string $variableName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function addServiceMethodCalls($id, $definition, $variableName = 'instance')
|
||||
@ -430,6 +437,7 @@ class PhpDumper extends Dumper
|
||||
* @param string $id
|
||||
* @param Definition $definition
|
||||
* @param string $variableName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function addServiceConfigurator($id, $definition, $variableName = 'instance')
|
||||
@ -454,6 +462,7 @@ class PhpDumper extends Dumper
|
||||
*
|
||||
* @param string $id
|
||||
* @param Definition $definition
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function addService($id, $definition)
|
||||
@ -544,6 +553,7 @@ EOF;
|
||||
*
|
||||
* @param string $alias
|
||||
* @param string $id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function addServiceAlias($alias, $id)
|
||||
@ -603,6 +613,7 @@ EOF;
|
||||
*
|
||||
* @param string $class Class name
|
||||
* @param string $baseClass The name of the base class
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function startClass($class, $baseClass)
|
||||
@ -787,6 +798,7 @@ EOF;
|
||||
* @param array $parameters
|
||||
* @param string $path
|
||||
* @param integer $indent
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function exportParameters($parameters, $path = '', $indent = 12)
|
||||
@ -829,6 +841,7 @@ EOF;
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $code
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function wrapServiceConditionals($value, $code)
|
||||
@ -852,8 +865,9 @@ EOF;
|
||||
* Builds service calls from arguments
|
||||
*
|
||||
* @param array $arguments
|
||||
* @param string $calls By reference
|
||||
* @param string $behavior By reference
|
||||
* @param string &$calls By reference
|
||||
* @param string &$behavior By reference
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function getServiceCallsFromArguments(array $arguments, array &$calls, array &$behavior)
|
||||
@ -882,6 +896,7 @@ EOF;
|
||||
* Returns the inline definition
|
||||
*
|
||||
* @param Definition $definition
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function getInlinedDefinitions(Definition $definition)
|
||||
@ -905,6 +920,7 @@ EOF;
|
||||
* Gets the definition from arguments
|
||||
*
|
||||
* @param array $arguments
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function getDefinitionsFromArguments(array $arguments)
|
||||
@ -930,6 +946,7 @@ EOF;
|
||||
*
|
||||
* @param string $id
|
||||
* @param array $arguments
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
private function hasReference($id, array $arguments)
|
||||
@ -954,6 +971,7 @@ EOF;
|
||||
*
|
||||
* @param array $value
|
||||
* @param Boolean $interpolate
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function dumpValue($value, $interpolate = true)
|
||||
@ -1037,6 +1055,7 @@ EOF;
|
||||
* Dumps a parameter
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function dumpParameter($name)
|
||||
@ -1053,6 +1072,7 @@ EOF;
|
||||
*
|
||||
* @param string $id
|
||||
* @param Reference $reference
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getServiceCall($id, Reference $reference = null)
|
||||
|
@ -63,6 +63,7 @@ class XmlDumper extends Dumper
|
||||
* Adds parameters.
|
||||
*
|
||||
* @param DOMElement $parent
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addParameters(\DOMElement $parent)
|
||||
@ -86,6 +87,7 @@ class XmlDumper extends Dumper
|
||||
*
|
||||
* @param array $methodcalls
|
||||
* @param DOMElement $parent
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addMethodCalls(array $methodcalls, \DOMElement $parent)
|
||||
@ -106,6 +108,7 @@ class XmlDumper extends Dumper
|
||||
* @param Definition $definition
|
||||
* @param string $id
|
||||
* @param DOMElement $parent
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addService($definition, $id, \DOMElement $parent)
|
||||
@ -176,6 +179,7 @@ class XmlDumper extends Dumper
|
||||
* @param string $alias
|
||||
* @param string $id
|
||||
* @param DOMElement $parent
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addServiceAlias($alias, $id, \DOMElement $parent)
|
||||
@ -193,6 +197,7 @@ class XmlDumper extends Dumper
|
||||
* Adds services.
|
||||
*
|
||||
* @param DOMElement $parent
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addServices(\DOMElement $parent)
|
||||
@ -220,6 +225,7 @@ class XmlDumper extends Dumper
|
||||
* @param string $type
|
||||
* @param DOMElement $parent
|
||||
* @param string $keyAttribute
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function convertParameters($parameters, $type, \DOMElement $parent, $keyAttribute = 'key')
|
||||
@ -261,6 +267,7 @@ class XmlDumper extends Dumper
|
||||
* Escapes arguments
|
||||
*
|
||||
* @param array $arguments
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function escape($arguments)
|
||||
@ -283,6 +290,7 @@ class XmlDumper extends Dumper
|
||||
* Converts php types to xml types.
|
||||
*
|
||||
* @param mixed $value Value to convert
|
||||
*
|
||||
* @throws \RuntimeException When trying to dump object or resource
|
||||
*/
|
||||
static public function phpToXml($value)
|
||||
|
@ -44,6 +44,7 @@ class YamlDumper extends Dumper
|
||||
*
|
||||
* @param string $id
|
||||
* @param Definition $definition
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function addService($id, $definition)
|
||||
@ -117,6 +118,7 @@ class YamlDumper extends Dumper
|
||||
*
|
||||
* @param string $alias
|
||||
* @param string $id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function addServiceAlias($alias, $id)
|
||||
@ -175,6 +177,7 @@ class YamlDumper extends Dumper
|
||||
* Dumps the value to YAML format
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @throws \RuntimeException When trying to dump object or resource
|
||||
*/
|
||||
private function dumpValue($value)
|
||||
@ -202,6 +205,7 @@ class YamlDumper extends Dumper
|
||||
*
|
||||
* @param string $id
|
||||
* @param Reference $reference
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getServiceCall($id, Reference $reference = null)
|
||||
@ -217,6 +221,7 @@ class YamlDumper extends Dumper
|
||||
* Gets parameter call.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getParameterCall($id)
|
||||
@ -228,6 +233,7 @@ class YamlDumper extends Dumper
|
||||
* Prepares parameters
|
||||
*
|
||||
* @param array $parameters
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function prepareParameters($parameters)
|
||||
@ -250,6 +256,7 @@ class YamlDumper extends Dumper
|
||||
* Escapes arguments
|
||||
*
|
||||
* @param array $arguments
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function escape($arguments)
|
||||
|
@ -76,6 +76,7 @@ class XmlFileLoader extends FileLoader
|
||||
*
|
||||
* @param SimpleXMLElement $xml
|
||||
* @param string $file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function parseParameters(SimpleXMLElement $xml, $file)
|
||||
@ -92,6 +93,7 @@ class XmlFileLoader extends FileLoader
|
||||
*
|
||||
* @param SimpleXMLElement $xml
|
||||
* @param string $file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function parseImports(SimpleXMLElement $xml, $file)
|
||||
@ -111,6 +113,7 @@ class XmlFileLoader extends FileLoader
|
||||
*
|
||||
* @param SimpleXMLElement $xml
|
||||
* @param string $file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function parseDefinitions(SimpleXMLElement $xml, $file)
|
||||
@ -130,6 +133,7 @@ class XmlFileLoader extends FileLoader
|
||||
* @param string $id
|
||||
* @param SimpleXMLElement $service
|
||||
* @param string $file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function parseDefinition($id, $service, $file)
|
||||
@ -202,6 +206,7 @@ class XmlFileLoader extends FileLoader
|
||||
* Parses a XML file.
|
||||
*
|
||||
* @param string $file Path to a file
|
||||
*
|
||||
* @throws \InvalidArgumentException When loading of XML file returns error
|
||||
*/
|
||||
private function parseFile($file)
|
||||
@ -224,6 +229,7 @@ class XmlFileLoader extends FileLoader
|
||||
*
|
||||
* @param SimpleXMLElement $xml
|
||||
* @param string $file
|
||||
*
|
||||
* @return array An array of anonymous services
|
||||
*/
|
||||
private function processAnonymousServices(SimpleXMLElement $xml, $file)
|
||||
@ -293,6 +299,7 @@ class XmlFileLoader extends FileLoader
|
||||
*
|
||||
* @param \DOMDocument $dom
|
||||
* @param string $file
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \RuntimeException When extension references a non-existent XSD file
|
||||
@ -368,6 +375,7 @@ EOF
|
||||
*
|
||||
* @param \DOMDocument $dom
|
||||
* @param string $file
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \InvalidArgumentException When non valid tag are found or no extension are found
|
||||
@ -421,6 +429,7 @@ EOF
|
||||
* Loads from an extension.
|
||||
*
|
||||
* @param SimpleXMLElement $xml
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function loadFromExtensions(SimpleXMLElement $xml)
|
||||
|
@ -82,6 +82,7 @@ class YamlFileLoader extends FileLoader
|
||||
*
|
||||
* @param array $content
|
||||
* @param string $file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function parseImports($content, $file)
|
||||
@ -101,6 +102,7 @@ class YamlFileLoader extends FileLoader
|
||||
*
|
||||
* @param array $content
|
||||
* @param string $file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function parseDefinitions($content, $file)
|
||||
@ -120,6 +122,7 @@ class YamlFileLoader extends FileLoader
|
||||
* @param string $id
|
||||
* @param array $service
|
||||
* @param string $file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function parseDefinition($id, $service, $file)
|
||||
@ -223,6 +226,7 @@ class YamlFileLoader extends FileLoader
|
||||
* Loads a YAML file.
|
||||
*
|
||||
* @param string $file
|
||||
*
|
||||
* @return array The file content
|
||||
*/
|
||||
private function loadFile($file)
|
||||
@ -235,6 +239,7 @@ class YamlFileLoader extends FileLoader
|
||||
*
|
||||
* @param mixed $content
|
||||
* @param string $file
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws \InvalidArgumentException When service file is not valid
|
||||
@ -273,6 +278,7 @@ class YamlFileLoader extends FileLoader
|
||||
* Resolves services.
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @return Reference
|
||||
*/
|
||||
private function resolveServices($value)
|
||||
@ -305,6 +311,7 @@ class YamlFileLoader extends FileLoader
|
||||
* Loads from Extensions
|
||||
*
|
||||
* @param array $content
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function loadFromExtensions($content)
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Component\DependencyInjection\ParameterBag;
|
||||
|
||||
/**
|
||||
* Holds read-only parameters.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
|
@ -16,6 +16,7 @@ use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceEx
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
|
||||
/**
|
||||
* Holds parameters.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
|
@ -22,6 +22,7 @@ class SimpleXMLElement extends \SimpleXMLElement
|
||||
* Converts an attribute as a php type.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getAttributeAsPhp($name)
|
||||
@ -95,6 +96,7 @@ class SimpleXMLElement extends \SimpleXMLElement
|
||||
* Converts an xml value to a php type.
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
static public function phpize($value)
|
||||
|
@ -43,7 +43,7 @@ class ChoiceFormField extends FormField
|
||||
|
||||
/**
|
||||
* Check if the current selected option is disabled
|
||||
*
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isDisabled()
|
||||
@ -56,7 +56,7 @@ class ChoiceFormField extends FormField
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value of the field.
|
||||
*
|
||||
@ -249,7 +249,7 @@ class ChoiceFormField extends FormField
|
||||
* Returns option value with associated disabled flag
|
||||
*
|
||||
* @param type $node
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function buildOptionValue($node)
|
||||
@ -259,7 +259,7 @@ class ChoiceFormField extends FormField
|
||||
$defaultValue = (isset($node->nodeValue) && !empty($node->nodeValue)) ? $node->nodeValue : '1';
|
||||
$option['value'] = $node->hasAttribute('value') ? $node->getAttribute('value') : $defaultValue;
|
||||
$option['disabled'] = ($node->hasAttribute('disabled') && $node->getAttribute('disabled') == 'disabled');
|
||||
|
||||
|
||||
return $option;
|
||||
}
|
||||
|
||||
@ -268,7 +268,7 @@ class ChoiceFormField extends FormField
|
||||
*
|
||||
* @param string $optionValue
|
||||
* @param array $options
|
||||
*
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function containsOption($optionValue, $options)
|
||||
|
@ -20,9 +20,6 @@ namespace Symfony\Component\EventDispatcher;
|
||||
* You can call the method stopPropagation() to abort the execution of
|
||||
* further listeners in your event listener.
|
||||
*
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.0
|
||||
* @version $Revision: 3938 $
|
||||
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
|
||||
* @author Jonathan Wage <jonwage@gmail.com>
|
||||
* @author Roman Borschel <roman@code-factory.org>
|
||||
|
@ -17,8 +17,6 @@ namespace Symfony\Component\EventDispatcher;
|
||||
* {@link getSubscribedEvents} and registers the subscriber as a listener for all
|
||||
* returned events.
|
||||
*
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.0
|
||||
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
|
||||
* @author Jonathan Wage <jonwage@gmail.com>
|
||||
* @author Roman Borschel <roman@code-factory.org>
|
||||
|
@ -25,11 +25,13 @@ namespace Symfony\Component\Finder\Comparator;
|
||||
*
|
||||
* Based on the Perl Number::Compare module.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com> PHP port
|
||||
* @author Richard Clamp <richardc@unixbeard.net> Perl version
|
||||
* @copyright 2004-2005 Fabien Potencier <fabien@symfony.com>
|
||||
* @copyright 2002 Richard Clamp <richardc@unixbeard.net>
|
||||
* @see http://physics.nist.gov/cuu/Units/binary.html
|
||||
* @author Fabien Potencier <fabien@symfony.com> PHP port
|
||||
* @author Richard Clamp <richardc@unixbeard.net> Perl version
|
||||
*
|
||||
* @copyright 2004-2005 Fabien Potencier <fabien@symfony.com>
|
||||
* @copyright 2002 Richard Clamp <richardc@unixbeard.net>
|
||||
*
|
||||
* @see http://physics.nist.gov/cuu/Units/binary.html
|
||||
*/
|
||||
class NumberComparator extends Comparator
|
||||
{
|
||||
|
@ -19,7 +19,8 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
class PropertyPathMapper implements DataMapperInterface
|
||||
{
|
||||
/**
|
||||
* Stores the class that the data of this form must be instances of
|
||||
* Stores the class that the data of this form must be instances of.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $dataClass;
|
||||
@ -30,7 +31,6 @@ class PropertyPathMapper implements DataMapperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dataClass $data
|
||||
* @param array $forms
|
||||
*
|
||||
|
@ -18,7 +18,8 @@ use Symfony\Component\HttpFoundation\Session;
|
||||
* session ID
|
||||
*
|
||||
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
|
||||
* @see DefaultCsrfProvider
|
||||
*
|
||||
* @see DefaultCsrfProvider
|
||||
*/
|
||||
class SessionCsrfProvider extends DefaultCsrfProvider
|
||||
{
|
||||
|
@ -27,9 +27,7 @@ class FieldTypeValidatorExtension extends AbstractTypeExtension
|
||||
|
||||
public function buildForm(FormBuilder $builder, array $options)
|
||||
{
|
||||
$options['validation_groups'] = empty($options['validation_groups'])
|
||||
? null
|
||||
: (array)$options['validation_groups'];
|
||||
$options['validation_groups'] = empty($options['validation_groups']) ? null : (array) $options['validation_groups'];
|
||||
|
||||
$builder
|
||||
->setAttribute('validation_groups', $options['validation_groups'])
|
||||
|
@ -162,7 +162,7 @@ class DelegatingValidator implements FormValidatorInterface
|
||||
$iterator = new \RecursiveIteratorIterator($iterator);
|
||||
|
||||
foreach ($iterator as $child) {
|
||||
$path = (string)$child->getAttribute('property_path');
|
||||
$path = (string) $child->getAttribute('property_path');
|
||||
$parts = explode('.', $path, 2);
|
||||
|
||||
$nestedNamePath = $namePath.'.'.$child->getName();
|
||||
@ -197,7 +197,7 @@ class DelegatingValidator implements FormValidatorInterface
|
||||
$iterator = new \RecursiveIteratorIterator($iterator);
|
||||
|
||||
foreach ($iterator as $child) {
|
||||
$path = (string)$child->getAttribute('property_path');
|
||||
$path = (string) $child->getAttribute('property_path');
|
||||
|
||||
$nestedNamePath = $namePath.'.'.$child->getName();
|
||||
|
||||
|
@ -79,6 +79,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
||||
* Guesses a field class name for a given constraint
|
||||
*
|
||||
* @param Constraint $constraint The constraint to guess for
|
||||
*
|
||||
* @return TypeGuess The guessed field class and options
|
||||
*/
|
||||
public function guessTypeForConstraint(Constraint $constraint)
|
||||
@ -227,6 +228,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
||||
* Guesses whether a field is required based on the given constraint
|
||||
*
|
||||
* @param Constraint $constraint The constraint to guess for
|
||||
*
|
||||
* @return Guess The guess whether the field is required
|
||||
*/
|
||||
public function guessRequiredForConstraint(Constraint $constraint)
|
||||
@ -254,6 +256,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
||||
* Guesses a field's maximum length based on the given constraint
|
||||
*
|
||||
* @param Constraint $constraint The constraint to guess for
|
||||
*
|
||||
* @return Guess The guess for the maximum length
|
||||
*/
|
||||
public function guessMaxLengthForConstraint(Constraint $constraint)
|
||||
@ -266,7 +269,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
||||
);
|
||||
case 'Symfony\Component\Validator\Constraints\Max':
|
||||
return new ValueGuess(
|
||||
strlen((string)$constraint->limit),
|
||||
strlen((string) $constraint->limit),
|
||||
Guess::HIGH_CONFIDENCE
|
||||
);
|
||||
}
|
||||
@ -276,6 +279,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
||||
* Guesses a field's minimum length based on the given constraint
|
||||
*
|
||||
* @param Constraint $constraint The constraint to guess for
|
||||
*
|
||||
* @return Guess The guess for the minimum length
|
||||
*/
|
||||
public function guessMinLengthForConstraint(Constraint $constraint)
|
||||
@ -288,7 +292,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
||||
);
|
||||
case 'Symfony\Component\Validator\Constraints\Min':
|
||||
return new ValueGuess(
|
||||
strlen((string)$constraint->limit),
|
||||
strlen((string) $constraint->limit),
|
||||
Guess::HIGH_CONFIDENCE
|
||||
);
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ interface FormTypeGuesserInterface
|
||||
*
|
||||
* @param string $class The fully qualified class name
|
||||
* @param string $property The name of the property to guess for
|
||||
*
|
||||
* @return Guess A guess for the field's minimum length
|
||||
*/
|
||||
function guessMinLength($class, $property);
|
||||
|
@ -48,6 +48,7 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
public function has($name)
|
||||
@ -202,7 +203,7 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
|
||||
/**
|
||||
* Returns a given child.
|
||||
*
|
||||
* @param string name The name of the child
|
||||
* @param string $name The name of the child
|
||||
*
|
||||
* @return FormView The child view
|
||||
*/
|
||||
|
@ -66,6 +66,7 @@ abstract class Guess
|
||||
* returned guess is any of them.
|
||||
*
|
||||
* @param array $guesses A list of guesses
|
||||
*
|
||||
* @return Guess The guess with the highest confidence
|
||||
*/
|
||||
static public function getBestGuess(array $guesses)
|
||||
|
@ -59,7 +59,7 @@ class PropertyPath implements \IteratorAggregate
|
||||
throw new InvalidPropertyPathException('The property path must not be empty');
|
||||
}
|
||||
|
||||
$this->string = (string)$propertyPath;
|
||||
$this->string = (string) $propertyPath;
|
||||
$position = 0;
|
||||
$remaining = $propertyPath;
|
||||
|
||||
@ -138,6 +138,7 @@ class PropertyPath implements \IteratorAggregate
|
||||
* Returns whether the element at the given index is a property
|
||||
*
|
||||
* @param integer $index The index in the property path
|
||||
*
|
||||
* @return Boolean Whether the element at this index is a property
|
||||
*/
|
||||
public function isProperty($index)
|
||||
@ -149,6 +150,7 @@ class PropertyPath implements \IteratorAggregate
|
||||
* Returns whether the element at the given index is an array index
|
||||
*
|
||||
* @param integer $index The index in the property path
|
||||
*
|
||||
* @return Boolean Whether the element at this index is an array index
|
||||
*/
|
||||
public function isIndex($index)
|
||||
@ -176,13 +178,12 @@ class PropertyPath implements \IteratorAggregate
|
||||
*
|
||||
* If neither is found, an exception is thrown.
|
||||
*
|
||||
* @param object|array $objectOrArray The object or array to traverse
|
||||
* @return mixed The value at the end of the
|
||||
* property path
|
||||
* @throws InvalidPropertyException If the property/getter does not
|
||||
* exist
|
||||
* @throws PropertyAccessDeniedException If the property/getter exists but
|
||||
* is not public
|
||||
* @param object|array $objectOrArray The object or array to traverse
|
||||
*
|
||||
* @return mixed The value at the end of the property path
|
||||
*
|
||||
* @throws InvalidPropertyException If the property/getter does not exist
|
||||
* @throws PropertyAccessDeniedException If the property/getter exists but is not public
|
||||
*/
|
||||
public function getValue($objectOrArray)
|
||||
{
|
||||
@ -228,12 +229,10 @@ class PropertyPath implements \IteratorAggregate
|
||||
* If neither is found, an exception is thrown.
|
||||
*
|
||||
* @param object|array $objectOrArray The object or array to traverse
|
||||
* @param mixed $value The value at the end of the
|
||||
* property path
|
||||
* @throws InvalidPropertyException If the property/setter does not
|
||||
* exist
|
||||
* @throws PropertyAccessDeniedException If the property/setter exists but
|
||||
* is not public
|
||||
* @param mixed $value The value at the end of the property path
|
||||
*
|
||||
* @throws InvalidPropertyException If the property/setter does not exist
|
||||
* @throws PropertyAccessDeniedException If the property/setter exists but is not public
|
||||
*/
|
||||
public function setValue(&$objectOrArray, $value)
|
||||
{
|
||||
@ -268,6 +267,7 @@ class PropertyPath implements \IteratorAggregate
|
||||
*
|
||||
* @param object $object The object to read from
|
||||
* @param integer $currentIndex The index of the read property in the path
|
||||
*
|
||||
* @return mixed The value of the property
|
||||
*/
|
||||
protected function readProperty($object, $currentIndex)
|
||||
@ -322,8 +322,7 @@ class PropertyPath implements \IteratorAggregate
|
||||
* Sets the value of the property at the given index in the path
|
||||
*
|
||||
* @param object $objectOrArray The object or array to traverse
|
||||
* @param integer $currentIndex The index of the modified property in the
|
||||
* path
|
||||
* @param integer $currentIndex The index of the modified property in the path
|
||||
* @param mixed $value The value to set
|
||||
*/
|
||||
protected function writeProperty(&$objectOrArray, $currentIndex, $value)
|
||||
|
@ -97,7 +97,9 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface
|
||||
* value.
|
||||
*
|
||||
* @param string $path The path to the file
|
||||
*
|
||||
* @return string The mime type or NULL, if none could be guessed
|
||||
*
|
||||
* @throws FileException If the file does not exist
|
||||
*/
|
||||
public function guess($path)
|
||||
|
@ -19,10 +19,12 @@ namespace Symfony\Component\HttpFoundation\File\MimeType;
|
||||
interface MimeTypeGuesserInterface
|
||||
{
|
||||
/**
|
||||
* Guesses the mime type of the file with the given path
|
||||
* Guesses the mime type of the file with the given path.
|
||||
*
|
||||
* @param string $path The path to the file
|
||||
*
|
||||
* @return string The mime type or NULL, if none could be guessed
|
||||
*
|
||||
* @throws FileNotFoundException If the file does not exist
|
||||
* @throws AccessDeniedException If the file could not be read
|
||||
*/
|
||||
|
@ -122,6 +122,7 @@ class FileBag extends ParameterBag
|
||||
* just returns the original array unmodified.
|
||||
*
|
||||
* @param array $data
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function fixPhpFilesArray($data)
|
||||
|
@ -454,6 +454,7 @@ class Request
|
||||
return $this->server->get('HTTP_CLIENT_IP');
|
||||
} elseif (self::$trustProxy && $this->server->has('HTTP_X_FORWARDED_FOR')) {
|
||||
$clientIp = explode(',', $this->server->get('HTTP_X_FORWARDED_FOR'), 2);
|
||||
|
||||
return isset($clientIp[0]) ? trim($clientIp[0]) : '';
|
||||
}
|
||||
}
|
||||
|
@ -120,6 +120,7 @@ class ResponseHeaderBag extends HeaderBag
|
||||
* Sets a cookie.
|
||||
*
|
||||
* @param Cookie $cookie
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @api
|
||||
@ -135,6 +136,7 @@ class ResponseHeaderBag extends HeaderBag
|
||||
* @param string $name
|
||||
* @param string $path
|
||||
* @param string $domain
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @api
|
||||
@ -195,6 +197,7 @@ class ResponseHeaderBag extends HeaderBag
|
||||
* @param string $name
|
||||
* @param string $path
|
||||
* @param string $domain
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @api
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Component\HttpKernel\CacheWarmer;
|
||||
|
||||
/**
|
||||
* Abstract cache warmer that knows how to write a file to the cache.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Component\HttpKernel\CacheWarmer;
|
||||
|
||||
/**
|
||||
* Aggregates several cache warmers into a single one.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Component\HttpKernel\CacheWarmer;
|
||||
|
||||
/**
|
||||
* Interface for classes able to warm up the cache.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -18,7 +18,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
*
|
||||
* Interface implemented by HTTP cache stores.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
@ -25,40 +25,56 @@ class NullLogger implements LoggerInterface
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function emerg($message, array $context = array()) {}
|
||||
public function emerg($message, array $context = array())
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function alert($message, array $context = array()) {}
|
||||
public function alert($message, array $context = array())
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function crit($message, array $context = array()) {}
|
||||
public function crit($message, array $context = array())
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function err($message, array $context = array()) {}
|
||||
public function err($message, array $context = array())
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function warn($message, array $context = array()) {}
|
||||
public function warn($message, array $context = array())
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function notice($message, array $context = array()) {}
|
||||
public function notice($message, array $context = array())
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function info($message, array $context = array()) {}
|
||||
public function info($message, array $context = array())
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function debug($message, array $context = array()) {}
|
||||
public function debug($message, array $context = array())
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ class Profiler
|
||||
/**
|
||||
* Saves a Profile.
|
||||
*
|
||||
* @param Profile A Profile instance
|
||||
* @param Profile $profile A Profile instance
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
|
@ -35,7 +35,9 @@ class Locale extends \Locale
|
||||
* Returns the country names for a locale
|
||||
*
|
||||
* @param string $locale The locale to use for the country names
|
||||
*
|
||||
* @return array The country names with their codes as keys
|
||||
*
|
||||
* @throws RuntimeException When the resource bundles cannot be loaded
|
||||
*/
|
||||
static public function getDisplayCountries($locale)
|
||||
@ -82,7 +84,9 @@ class Locale extends \Locale
|
||||
* Returns the language names for a locale
|
||||
*
|
||||
* @param string $locale The locale to use for the language names
|
||||
*
|
||||
* @return array The language names with their codes as keys
|
||||
*
|
||||
* @throws RuntimeException When the resource bundles cannot be loaded
|
||||
*/
|
||||
static public function getDisplayLanguages($locale)
|
||||
|
@ -80,6 +80,7 @@ class FullTransformer
|
||||
* Format a DateTime using ICU dateformat pattern
|
||||
*
|
||||
* @param DateTime $dateTime A DateTime object to be used to generate the formatted value
|
||||
*
|
||||
* @return string The formatted value
|
||||
*/
|
||||
public function format(\DateTime $dateTime)
|
||||
@ -98,7 +99,9 @@ class FullTransformer
|
||||
*
|
||||
* @param string $dateChars The date characters to be replaced with a formatted ICU value
|
||||
* @param DateTime $dateTime A DateTime object to be used to generate the formatted value
|
||||
*
|
||||
* @return string The formatted value
|
||||
*
|
||||
* @throws NotImplementedException When it encounters a not implemented date character
|
||||
*/
|
||||
public function formatReplace($dateChars, $dateTime)
|
||||
@ -126,7 +129,9 @@ class FullTransformer
|
||||
*
|
||||
* @param DateTime $dateTime A configured DateTime object to use to perform the date calculation
|
||||
* @param string $value String to convert to a time value
|
||||
*
|
||||
* @return int The corresponding Unix timestamp
|
||||
*
|
||||
* @throws InvalidArgumentException When the value can not be matched with pattern
|
||||
*/
|
||||
public function parse(\DateTime $dateTime, $value)
|
||||
@ -156,6 +161,7 @@ class FullTransformer
|
||||
* Retrieve a regular expression to match with a formatted value.
|
||||
*
|
||||
* @param string $pattern The pattern to create the reverse matching regular expression
|
||||
*
|
||||
* @return string The reverse matching regular expression with named captures being formed by the
|
||||
* transformer index in the $transformer array
|
||||
*/
|
||||
@ -191,6 +197,7 @@ class FullTransformer
|
||||
* Check if the first char of a string is a single quote
|
||||
*
|
||||
* @param string $quoteMatch The string to check
|
||||
*
|
||||
* @return Boolean true if matches, false otherwise
|
||||
*/
|
||||
public function isQuoteMatch($quoteMatch)
|
||||
@ -202,6 +209,7 @@ class FullTransformer
|
||||
* Replaces single quotes at the start or end of a string with two single quotes
|
||||
*
|
||||
* @param string $quoteMatch The string to replace the quotes
|
||||
*
|
||||
* @return string A string with the single quotes replaced
|
||||
*/
|
||||
public function replaceQuoteMatch($quoteMatch)
|
||||
@ -217,6 +225,7 @@ class FullTransformer
|
||||
* Builds a chars match regular expression
|
||||
*
|
||||
* @param string $specialChars A string of chars to build the regular expression
|
||||
*
|
||||
* @return string The chars match regular expression
|
||||
*/
|
||||
protected function buildCharsMatch($specialChars)
|
||||
@ -235,6 +244,7 @@ class FullTransformer
|
||||
* with the value and pattern values for the matched Transformer
|
||||
*
|
||||
* @param array $data
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function normalizeArray(array $data)
|
||||
@ -261,6 +271,7 @@ class FullTransformer
|
||||
*
|
||||
* @param DateTime $dateTime The DateTime object to be used to calculate the timestamp
|
||||
* @param array $options An array with the matched values to be used to calculate the timestamp
|
||||
*
|
||||
* @return Boolean|int The calculated timestamp or false if matched date is invalid
|
||||
*/
|
||||
protected function calculateUnixTimestamp(\DateTime $dateTime, array $options)
|
||||
@ -312,6 +323,7 @@ class FullTransformer
|
||||
* are base in the beginning of the Unix era
|
||||
*
|
||||
* @param array $options
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function getDefaultValueForOptions(array $options)
|
||||
|
@ -23,6 +23,7 @@ abstract class HourTransformer extends Transformer
|
||||
*
|
||||
* @param int $hour The hour value
|
||||
* @param string $marker An optional AM/PM marker
|
||||
*
|
||||
* @return int The normalized hour value
|
||||
*/
|
||||
abstract public function normalizeHour($hour, $marker = null);
|
||||
|
@ -64,10 +64,13 @@ class TimeZoneTransformer extends Transformer
|
||||
* Only GMT, Etc/Universal, Etc/Zulu, Etc/Greenwich, Etc/GMT-0, Etc/GMT+0 and Etc/GMT0 are old names and
|
||||
* are linked to Etc/GMT or Etc/UTC.
|
||||
*
|
||||
* @param string $timezone A GMT timezone string (GMT-03:00, e.g.)
|
||||
* @return string A timezone identifier
|
||||
* @param string $formattedTimeZone A GMT timezone string (GMT-03:00, e.g.)
|
||||
*
|
||||
* @return string A timezone identifier
|
||||
*
|
||||
* @see http://php.net/manual/en/timezones.others.php
|
||||
* @see http://www.twinsun.com/tz/tz-link.htm
|
||||
*
|
||||
* @throws NotImplementedException When the GMT time zone have minutes offset different than zero
|
||||
* @throws InvalidArgumentException When the value can not be matched with pattern
|
||||
*/
|
||||
|
@ -24,6 +24,7 @@ abstract class Transformer
|
||||
*
|
||||
* @param DateTime $dateTime A DateTime object to be used to generate the formatted value
|
||||
* @param int $length The formatted value string length
|
||||
*
|
||||
* @return string The formatted value
|
||||
*/
|
||||
abstract public function format(\DateTime $dateTime, $length);
|
||||
@ -32,6 +33,7 @@ abstract class Transformer
|
||||
* Returns a reverse matching regular expression of a string generated by format()
|
||||
*
|
||||
* @param int $length The length of the value to be reverse matched
|
||||
*
|
||||
* @return string The reverse matching regular expression
|
||||
*/
|
||||
abstract public function getReverseMatchingRegExp($length);
|
||||
@ -42,6 +44,7 @@ abstract class Transformer
|
||||
*
|
||||
* @param string $matched The matched value
|
||||
* @param int $length The length of the Transformer pattern string
|
||||
*
|
||||
* @return array An associative array
|
||||
*/
|
||||
abstract public function extractDateOptions($matched, $length);
|
||||
@ -51,6 +54,7 @@ abstract class Transformer
|
||||
*
|
||||
* @param string $value The string to be padded
|
||||
* @param int $length The length to pad
|
||||
*
|
||||
* @return string The padded string
|
||||
*/
|
||||
protected function padLeft($value, $length)
|
||||
|
@ -69,6 +69,7 @@ class StubCollator
|
||||
* Constructor
|
||||
*
|
||||
* @param string $locale The locale code
|
||||
*
|
||||
* @throws MethodArgumentValueNotImplementedException When $locale different than 'en' is passed
|
||||
*/
|
||||
public function __construct($locale)
|
||||
@ -82,6 +83,7 @@ class StubCollator
|
||||
* Static constructor
|
||||
*
|
||||
* @param string $locale The locale code
|
||||
*
|
||||
* @throws MethodArgumentValueNotImplementedException When $locale different than 'en' is passed
|
||||
*/
|
||||
static public function create($locale)
|
||||
@ -97,6 +99,7 @@ class StubCollator
|
||||
* StubCollator::SORT_REGULAR - compare items normally (don't change types)
|
||||
* StubCollator::SORT_NUMERIC - compare items numerically
|
||||
* StubCollator::SORT_STRING - compare items as strings
|
||||
*
|
||||
* @return Boolean True on success or false on failure
|
||||
*/
|
||||
public function asort(&$array, $sortFlag = self::SORT_REGULAR)
|
||||
@ -117,11 +120,14 @@ class StubCollator
|
||||
*
|
||||
* @param string $str1 The first string to compare
|
||||
* @param string $str2 The second string to compare
|
||||
*
|
||||
* @return Boolean|int Return the comparison result or false on failure:
|
||||
* 1 if $str1 is greater than $str2
|
||||
* 0 if $str1 is equal than $str2
|
||||
* -1 if $str1 is less than $str2
|
||||
*
|
||||
* @see http://www.php.net/manual/en/collator.compare.php
|
||||
*
|
||||
* @throws MethodNotImplementedException
|
||||
*/
|
||||
public function compare($str1, $str2)
|
||||
@ -133,8 +139,11 @@ class StubCollator
|
||||
* Get a value of an integer collator attribute
|
||||
*
|
||||
* @param int $attr An attribute specifier, one of the attribute constants
|
||||
*
|
||||
* @return Boolean|int The attribute value on success or false on error
|
||||
*
|
||||
* @see http://www.php.net/manual/en/collator.getattribute.php
|
||||
*
|
||||
* @throws MethodNotImplementedException
|
||||
*/
|
||||
public function getAttribute($attr)
|
||||
@ -166,6 +175,7 @@ class StubCollator
|
||||
* Returns the collator's locale
|
||||
*
|
||||
* @param int $type The locale name type to return between valid or actual (StubLocale::VALID_LOCALE or StubLocale::ACTUAL_LOCALE, respectively)
|
||||
*
|
||||
* @return string The locale name used to create the collator
|
||||
*/
|
||||
public function getLocale($type = StubLocale::ACTUAL_LOCALE)
|
||||
@ -177,8 +187,11 @@ class StubCollator
|
||||
* Get sorting key for a string
|
||||
*
|
||||
* @param string $string The string to produce the key from
|
||||
*
|
||||
* @return string The collation key for $string
|
||||
*
|
||||
* @see http://www.php.net/manual/en/collator.getsortkey.php
|
||||
*
|
||||
* @throws MethodNotImplementedException
|
||||
*/
|
||||
public function getSortKey($string)
|
||||
@ -190,7 +203,9 @@ class StubCollator
|
||||
* Get current collator's strength
|
||||
*
|
||||
* @return Boolean|int The current collator's strength or false on failure
|
||||
*
|
||||
* @see http://www.php.net/manual/en/collator.getstrength.php
|
||||
*
|
||||
* @throws MethodNotImplementedException
|
||||
*/
|
||||
public function getStrength()
|
||||
@ -203,8 +218,11 @@ class StubCollator
|
||||
*
|
||||
* @param int $attr An attribute specifier, one of the attribute constants
|
||||
* @param int $val The attribute value, one of the attribute value constants
|
||||
*
|
||||
* @return Boolean True on success or false on failure
|
||||
*
|
||||
* @see http://www.php.net/manual/en/collator.setattribute.php
|
||||
*
|
||||
* @throws MethodNotImplementedException
|
||||
*/
|
||||
public function setAttribute($attr, $val)
|
||||
@ -222,8 +240,11 @@ class StubCollator
|
||||
* StubCollator::QUATERNARY
|
||||
* StubCollator::IDENTICAL
|
||||
* StubCollator::DEFAULT
|
||||
*
|
||||
* @return Boolean True on success or false on failure
|
||||
*
|
||||
* @see http://www.php.net/manual/en/collator.setstrength.php
|
||||
*
|
||||
* @throws MethodNotImplementedException
|
||||
*/
|
||||
public function setStrength($strength)
|
||||
@ -235,8 +256,11 @@ class StubCollator
|
||||
* Sort array using specified collator and sort keys
|
||||
*
|
||||
* @param array &$arr Array of strings to sort
|
||||
*
|
||||
* @return Boolean True on success or false on failure
|
||||
*
|
||||
* @see http://www.php.net/manual/en/collator.sortwithsortkeys.php
|
||||
*
|
||||
* @throws MethodNotImplementedException
|
||||
*/
|
||||
public function sortWithSortKeys(&$arr)
|
||||
@ -252,8 +276,11 @@ class StubCollator
|
||||
* StubCollator::SORT_REGULAR
|
||||
* StubCollator::SORT_NUMERIC
|
||||
* StubCollator::SORT_STRING
|
||||
*
|
||||
* @return Boolean True on success or false on failure
|
||||
*
|
||||
* @see http://www.php.net/manual/en/collator.sort.php
|
||||
*
|
||||
* @throws MethodNotImplementedException
|
||||
*/
|
||||
public function sort(&$arr, $sortFlag = self::SORT_REGULAR)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user