Permalink
Browse files

minor #3656 Minimize horizontal scrolling, add missing characters, re…

…move trailing whitespace. (ifdattic)

This PR was merged into the 2.3 branch.

Discussion
----------

Minimize horizontal scrolling, add missing characters, remove trailing whitespace.

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3
| Fixed tickets |

Commits
-------

7006c02 Minimize horizontal scrolling, add missing characters.
  • Loading branch information...
weaverryan committed Mar 19, 2014
2 parents 7c0c5d1 + 7006c02 commit 1b4f6a6344ecaa29478293767a21dd896fd22cf2
@@ -107,7 +107,8 @@ the ``OptionsResolver`` class::
protected function configureOptions(OptionsResolverInterface $resolver)
{
// ... configure the resolver, you will learn this in the sections below
// ... configure the resolver, you will learn this
// in the sections below
}
}
@@ -256,7 +257,9 @@ again. When using a closure as the new value it is passed 2 arguments:
$resolver->setDefaults(array(
'encryption' => 'tls', // simple overwrite
'host' => function (Options $options, $previousValue) {
return 'localhost' == $previousValue ? '127.0.0.1' : $previousValue;
return 'localhost' == $previousValue
? '127.0.0.1'
: $previousValue;
},
));
}
@@ -196,7 +196,9 @@ enable this feature by using :class:`Symfony\\Component\\PropertyAccess\\Propert
{
$property = lcfirst(substr($name, 3));
if ('get' === substr($name, 0, 3)) {
return isset($this->children[$property]) ? $this->children[$property] : null;
return isset($this->children[$property])
? $this->children[$property]
: null;
} elseif ('set' === substr($name, 0, 3)) {
$value = 1 == count($args) ? $args[0] : null;
$this->children[$property] = $value;
@@ -289,7 +291,9 @@ see `Enable other Features`_.
{
$property = lcfirst(substr($name, 3));
if ('get' === substr($name, 0, 3)) {
return isset($this->children[$property]) ? $this->children[$property] : null;
return isset($this->children[$property])
? $this->children[$property]
: null;
} elseif ('set' === substr($name, 0, 3)) {
$value = 1 == count($args) ? $args[0] : null;
$this->children[$property] = $value;
@@ -307,7 +311,7 @@ see `Enable other Features`_.
$accessor->setValue($person, 'wouter', array(...));
echo $person->getWouter() // array(...)
echo $person->getWouter(); // array(...)
Mixing Objects and Arrays
-------------------------
@@ -12,14 +12,17 @@ certain action or resource of the application::
use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
// instance of Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface
$authenticationManager = ...;
// instance of Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface
$accessDecisionManager = ...;
$securityContext = new SecurityContext($authenticationManager, $accessDecisionManager);
$securityContext = new SecurityContext(
$authenticationManager,
$accessDecisionManager
);
// ... authenticate the user
@@ -71,7 +74,10 @@ with the event dispatcher that is used by the :class:`Symfony\\Component\\HttpKe
$firewall = new Firewall($map, $dispatcher);
$dispatcher->addListener(KernelEvents::REQUEST, array($firewall, 'onKernelRequest');
$dispatcher->addListener(
KernelEvents::REQUEST,
array($firewall, 'onKernelRequest')
);
The firewall is registered to listen to the ``kernel.request`` event that
will be dispatched by the HttpKernel at the beginning of each request
View
@@ -68,13 +68,13 @@ call::
In addition to periods, you can get other useful information from the event object.
For example::
$event->getCategory(); // Returns the category the event was started in
$event->getOrigin(); // Returns the event start time in milliseconds
$event->ensureStopped(); // Stops all periods not already stopped
$event->getStartTime(); // Returns the start time of the very first period
$event->getEndTime(); // Returns the end time of the very last period
$event->getDuration(); // Returns the event duration, including all periods
$event->getMemory(); // Returns the max memory usage of all periods
$event->getCategory(); // Returns the category the event was started in
$event->getOrigin(); // Returns the event start time in milliseconds
$event->ensureStopped(); // Stops all periods not already stopped
$event->getStartTime(); // Returns the start time of the very first period
$event->getEndTime(); // Returns the end time of the very last period
$event->getDuration(); // Returns the event duration, including all periods
$event->getMemory(); // Returns the max memory usage of all periods
Sections
--------
@@ -24,7 +24,9 @@ display the content of the slot on that place:
<!doctype html>
<html>
<head>
<title><?php $view['slots']->output('title', 'Default title') ?></title>
<title>
<?php $view['slots']->output('title', 'Default title') ?>
</title>
</head>
<body>
<?php $view['slots']->output('_content') ?>
@@ -190,7 +190,12 @@ loaded like this::
$translator->addResource('xliff', 'messages.fr.xliff', 'fr_FR');
$translator->addResource('xliff', 'admin.fr.xliff', 'fr_FR', 'admin');
$translator->addResource('xliff', 'navigation.fr.xliff', 'fr_FR', 'navigation');
$translator->addResource(
'xliff',
'navigation.fr.xliff',
'fr_FR',
'navigation'
);
When translating strings that are not in the default domain (``messages``),
you must specify the domain as the third argument of ``trans()``::

0 comments on commit 1b4f6a6

Please sign in to comment.