Skip to content

Commit 2ae36f3

Browse files
committed
Merge branch '2.0'
2 parents e5ddc77 + fb6317b commit 2ae36f3

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

components/dom_crawler.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ useful methods for working with forms:
228228

229229
The :method:`Symfony\\Component\\DomCrawler\\Form::getUri` method does more
230230
than just return the ``action`` attribute of the form. If the form method
231-
is GET, then it mimics the browsers behavior and returns a the ``action``
231+
is GET, then it mimics the browser's behavior and returns the ``action``
232232
attribute followed by a query string of all of the form's values.
233233

234234
You can virtually set and get values on the form::

components/finder.rst

+8-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ directories::
2828
$finder->files()->in(__DIR__);
2929

3030
foreach ($finder as $file) {
31+
// Print the absolute path
3132
print $file->getRealpath()."\n";
33+
// Print the relative path to the file, omitting the filename
34+
print $file->getRelativePath()."\n";
35+
// Print the relative path to the file
36+
print $file->getRelativePathname()."\n";
3237
}
3338

3439
The ``$file`` is an instance of :class:`Symfony\\Component\\Finder\\SplFileInfo`
@@ -208,8 +213,9 @@ To restrict the matching file with your own strategy, use
208213
$finder->files()->filter($filter);
209214

210215
The ``filter()`` method takes a Closure as an argument. For each matching file,
211-
it is called with the file as a :phpclass:`SplFileInfo` instance. The file is
212-
excluded from the result set if the Closure returns ``false``.
216+
it is called with the file as a :class:`Symfony\\Component\\Finder\\SplFileInfo`
217+
instance. The file is excluded from the result set if the Closure returns
218+
``false``.
213219

214220
.. _strtotime: http://www.php.net/manual/en/datetime.formats.php
215221
.. _Iterator: http://www.php.net/manual/en/spl.iterators.php

components/routing.rst

+9-1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ the POST method and a secure connection::
117117

118118
$route = new Route('/foo', array('_method' => 'post', '_scheme' => 'https' ));
119119

120+
.. tip::
121+
122+
If you want to match all urls which start with a certain path and end in an
123+
arbitrary suffix you can use the following route definition::
124+
125+
$route = new Route('/start/{suffix}', array('suffix' => ''), array('suffix' => '.*'));
126+
127+
120128
Using Prefixes
121129
~~~~~~~~~~~~~~
122130

@@ -292,4 +300,4 @@ automatically in the background if you want to use it. A basic example of the
292300

293301
If you use caching, the Routing component will compile new classes which
294302
are saved in the ``cache_dir``. This means your script must have write
295-
permissions for that location.
303+
permissions for that location.

cookbook/security/voters.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ and compare the IP address against a set of blacklisted IP addresses:
8888
function vote(TokenInterface $token, $object, array $attributes)
8989
{
9090
$request = $this->container->get('request');
91-
if (in_array($this->request->getClientIp(), $this->blacklistedIp)) {
91+
if (in_array($request->getClientIp(), $this->blacklistedIp)) {
9292
return VoterInterface::ACCESS_DENIED;
9393
}
9494

cookbook/web_services/php_soap_extension.rst

+3-4
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ create one from scratch or use a 3rd party generator.
1212
.. note::
1313

1414
There are several SOAP server implementations available for use with
15-
PHP. `Zend SOAP`_ and `NuSOAP`_ are two examples. Although we use
15+
PHP. `Zend SOAP`_ and `NuSOAP`_ are two examples. Although we use
1616
the PHP SOAP extension in our examples, the general idea should still
1717
be applicable to other implementations.
1818

1919
SOAP works by exposing the methods of a PHP object to an external entity
2020
(i.e. the person using the SOAP service). To start, create a class - ``HelloService`` -
2121
which represents the functionality that you'll expose in your SOAP service.
2222
In this case, the SOAP service will allow the client to call a method called
23-
``hello``, which happens to send an email address::
23+
``hello``, which happens to send an email::
2424

2525
namespace Acme\SoapBundle;
2626

@@ -46,7 +46,6 @@ In this case, the SOAP service will allow the client to call a method called
4646

4747
return 'Hello, ' . $name;
4848
}
49-
5049
}
5150

5251
Next, you can train Symfony to be able to create an instance of this class.
@@ -112,7 +111,7 @@ into the content of the Response and clear the output buffer. Finally, you're
112111
ready to return the ``Response``.
113112

114113
Below is an example calling the service using `NuSOAP`_ client. This example
115-
assumes the ``indexAction`` in the controller above is accessible via the
114+
assumes that the ``indexAction`` in the controller above is accessible via the
116115
route ``/soap``::
117116

118117
$client = new \soapclient('http://example.com/app.php/soap?wsdl', true);

0 commit comments

Comments
 (0)