Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
5e0a609d
Commit
5e0a609d
authored
Jan 18, 2013
by
hakre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor WS fixes in documentation
Spaces at the end of line.
parent
39d0c80e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
doc/providers/service_controller.rst
doc/providers/service_controller.rst
+3
-3
doc/usage.rst
doc/usage.rst
+1
-1
No files found.
doc/providers/service_controller.rst
View file @
5e0a609d
...
@@ -4,7 +4,7 @@ ServiceControllerServiceProvider
...
@@ -4,7 +4,7 @@ ServiceControllerServiceProvider
As your Silex application grows, you may wish to begin organizing your
As your Silex application grows, you may wish to begin organizing your
controllers in a more formal fashion. Silex can use controller classes out of
controllers in a more formal fashion. Silex can use controller classes out of
the box, but with a bit of work, your controllers can be created as services,
the box, but with a bit of work, your controllers can be created as services,
giving you the full power of dependency injection and lazy loading.
giving you the full power of dependency injection and lazy loading.
.. ::todo Link above to controller classes cookbook
.. ::todo Link above to controller classes cookbook
...
@@ -25,7 +25,7 @@ Why would I want to do this?
...
@@ -25,7 +25,7 @@ Why would I want to do this?
framework you are using. Carefully crafted, your controllers will become
framework you are using. Carefully crafted, your controllers will become
reusable with multiple frameworks. By keeping careful control of your
reusable with multiple frameworks. By keeping careful control of your
dependencies, your controllers could easily become compatible with Silex,
dependencies, your controllers could easily become compatible with Silex,
Symfony (full stack) and Drupal, to name just a few.
Symfony (full stack) and Drupal, to name just a few.
Parameters
Parameters
----------
----------
...
@@ -67,7 +67,7 @@ In this slightly contrived example of a blog API, we're going to change the
...
@@ -67,7 +67,7 @@ In this slightly contrived example of a blog API, we're going to change the
});
});
Rewriting your controller as a service is pretty simple, create a Plain Ol' PHP
Rewriting your controller as a service is pretty simple, create a Plain Ol' PHP
Object with your ``PostRepository`` as a dependency, along with an
Object with your ``PostRepository`` as a dependency, along with an
``indexJsonAction`` method to handle the request. Although not shown in the
``indexJsonAction`` method to handle the request. Although not shown in the
example below, you can use type hinting and parameter naming to get the
example below, you can use type hinting and parameter naming to get the
parameters you need, just like with standard Silex routes.
parameters you need, just like with standard Silex routes.
...
...
doc/usage.rst
View file @
5e0a609d
...
@@ -100,7 +100,7 @@ A route pattern consists of:
...
@@ -100,7 +100,7 @@ A route pattern consists of:
pattern can include variable parts and you are able to set RegExp
pattern can include variable parts and you are able to set RegExp
requirements for them.
requirements for them.
* *Method*: One of the following HTTP methods: ``GET``, ``POST``, ``PUT`` or
* *Method*: One of the following HTTP methods: ``GET``, ``POST``, ``PUT`` or
``DELETE``. This describes the interaction with the resource. Commonly only
``DELETE``. This describes the interaction with the resource. Commonly only
``GET`` and ``POST`` are used, but it is possible to use the others as well.
``GET`` and ``POST`` are used, but it is possible to use the others as well.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment