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
8c4cfc59
Commit
8c4cfc59
authored
Mar 25, 2011
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed phpdoc and renamed getRouteCollection() to getRoutes()
parent
5aa6a974
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
27 deletions
+27
-27
src/Silex/Application.php
src/Silex/Application.php
+14
-14
src/Silex/Controller.php
src/Silex/Controller.php
+4
-4
src/Silex/ControllerCollection.php
src/Silex/ControllerCollection.php
+2
-2
src/Silex/StringResponseConverter.php
src/Silex/StringResponseConverter.php
+1
-1
src/Silex/WebTestCase.php
src/Silex/WebTestCase.php
+1
-1
tests/Silex/Tests/ApplicationTest.php
tests/Silex/Tests/ApplicationTest.php
+4
-4
tests/Silex/Tests/FunctionalTest.php
tests/Silex/Tests/FunctionalTest.php
+1
-1
No files found.
src/Silex/Application.php
View file @
8c4cfc59
...
...
@@ -58,7 +58,7 @@ class Application extends HttpKernel implements EventSubscriberInterface
}
/**
* Get the current request.
* Get
s
the current request.
*
* @return Symfony\Component\HttpFoundation\Request
*/
...
...
@@ -68,17 +68,17 @@ class Application extends HttpKernel implements EventSubscriberInterface
}
/**
* Get the collection of routes.
* Get
s
the collection of routes.
*
* @return Symfony\Component\Routing\RouteCollection
*/
public
function
getRoute
Collection
()
public
function
getRoute
s
()
{
return
$this
->
routes
;
}
/**
* Map a pattern to a callable.
* Map
s
a pattern to a callable.
*
* You can optionally specify HTTP methods that should be matched.
*
...
...
@@ -105,7 +105,7 @@ class Application extends HttpKernel implements EventSubscriberInterface
}
/**
* Map a GET request to a callable.
* Map
s
a GET request to a callable.
*
* @param string $pattern Matched route pattern
* @param mixed $to Callback that returns the response when matched
...
...
@@ -118,7 +118,7 @@ class Application extends HttpKernel implements EventSubscriberInterface
}
/**
* Map a POST request to a callable.
* Map
s
a POST request to a callable.
*
* @param string $pattern Matched route pattern
* @param mixed $to Callback that returns the response when matched
...
...
@@ -131,7 +131,7 @@ class Application extends HttpKernel implements EventSubscriberInterface
}
/**
* Map a PUT request to a callable.
* Map
s
a PUT request to a callable.
*
* @param string $pattern Matched route pattern
* @param mixed $to Callback that returns the response when matched
...
...
@@ -144,7 +144,7 @@ class Application extends HttpKernel implements EventSubscriberInterface
}
/**
* Map a DELETE request to a callable.
* Map
s
a DELETE request to a callable.
*
* @param string $pattern Matched route pattern
* @param mixed $to Callback that returns the response when matched
...
...
@@ -157,7 +157,7 @@ class Application extends HttpKernel implements EventSubscriberInterface
}
/**
* Register a before filter.
* Register
s
a before filter.
*
* Before filters are run before any route has been matched.
*
...
...
@@ -175,7 +175,7 @@ class Application extends HttpKernel implements EventSubscriberInterface
}
/**
* Register an after filter.
* Register
s
an after filter.
*
* After filters are run after the controller has been executed.
*
...
...
@@ -193,7 +193,7 @@ class Application extends HttpKernel implements EventSubscriberInterface
}
/**
* Register an error handler.
* Register
s
an error handler.
*
* Error handlers are simple callables which take a single Exception
* as an argument. If a controller throws an exception, an error handler
...
...
@@ -226,7 +226,7 @@ class Application extends HttpKernel implements EventSubscriberInterface
}
/**
* Flush the controller collection.
* Flush
es
the controller collection.
*/
public
function
flush
()
{
...
...
@@ -234,7 +234,7 @@ class Application extends HttpKernel implements EventSubscriberInterface
}
/**
* Handle the request and deliver the response.
* Handle
s
the request and deliver the response.
*
* @param Request $request Request to process
*/
...
...
@@ -248,7 +248,7 @@ class Application extends HttpKernel implements EventSubscriberInterface
}
/**
* Handle
r for onCoreRequest
.
* Handle
s onCoreRequest events
.
*/
public
function
onCoreRequest
(
KernelEvent
$event
)
{
...
...
src/Silex/Controller.php
View file @
8c4cfc59
...
...
@@ -37,7 +37,7 @@ class Controller
}
/**
* Get the controller's route.
* Get
s
the controller's route.
*/
public
function
getRoute
()
{
...
...
@@ -45,7 +45,7 @@ class Controller
}
/**
* Get the controller's route name.
* Get
s
the controller's route name.
*/
public
function
getRouteName
()
{
...
...
@@ -53,7 +53,7 @@ class Controller
}
/**
* Set the controller's route.
* Set
s
the controller's route.
*
* @param string $routeName
*/
...
...
@@ -67,7 +67,7 @@ class Controller
}
/**
* Freeze the controller.
* Freeze
s
the controller.
*
* Once the controller is frozen, you can no longer change the route name
*/
...
...
src/Silex/ControllerCollection.php
View file @
8c4cfc59
...
...
@@ -33,7 +33,7 @@ class ControllerCollection
}
/**
* Add a controller to the staging area.
* Add
s
a controller to the staging area.
*
* @param Controller $controller
*/
...
...
@@ -43,7 +43,7 @@ class ControllerCollection
}
/**
* Persist
and freeze
staged controllers.
* Persist
s and freezes
staged controllers.
*/
public
function
flush
()
{
...
...
src/Silex/StringResponseConverter.php
View file @
8c4cfc59
...
...
@@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\Response;
class
StringResponseConverter
{
/**
* Do the conversion
* Do
es
the conversion
*
* @param $response The response string
* @return A response object
...
...
src/Silex/WebTestCase.php
View file @
8c4cfc59
...
...
@@ -35,7 +35,7 @@ abstract class WebTestCase extends BaseWebTestCase
}
/**
* Create the application (HttpKernel, most likely Framework).
* Create
s
the application (HttpKernel, most likely Framework).
*
* @return Symfony\Component\HttpKernel\HttpKernel
*/
...
...
tests/Silex/Tests/ApplicationTest.php
View file @
8c4cfc59
...
...
@@ -70,16 +70,16 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
$this
->
assertEquals
(
$request
,
$application
->
getRequest
());
}
public
function
test
GetRouteCollection
WithNoRoutes
()
public
function
test
getRoutes
WithNoRoutes
()
{
$application
=
new
Application
();
$routes
=
$application
->
getRoute
Collection
();
$routes
=
$application
->
getRoute
s
();
$this
->
assertInstanceOf
(
'Symfony\Component\Routing\RouteCollection'
,
$routes
);
$this
->
assertEquals
(
0
,
count
(
$routes
->
all
()));
}
public
function
test
GetRouteCollection
WithRoutes
()
public
function
test
getRoutes
WithRoutes
()
{
$application
=
new
Application
();
...
...
@@ -91,7 +91,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
return
'bar'
;
});
$routes
=
$application
->
getRoute
Collection
();
$routes
=
$application
->
getRoute
s
();
$this
->
assertInstanceOf
(
'Symfony\Component\Routing\RouteCollection'
,
$routes
);
$this
->
assertEquals
(
0
,
count
(
$routes
->
all
()));
$application
->
flush
();
...
...
tests/Silex/Tests/FunctionalTest.php
View file @
8c4cfc59
...
...
@@ -35,7 +35,7 @@ class FunctionalTest extends \PHPUnit_Framework_TestCase
->
setRouteName
(
'foo_abc'
);
$application
->
flush
();
$routes
=
$application
->
getRoute
Collection
();
$routes
=
$application
->
getRoute
s
();
$this
->
assertInstanceOf
(
'Symfony\Component\Routing\Route'
,
$routes
->
get
(
'homepage'
));
$this
->
assertInstanceOf
(
'Symfony\Component\Routing\Route'
,
$routes
->
get
(
'foo_abc'
));
}
...
...
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