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
46dc1dff
Commit
46dc1dff
authored
Nov 10, 2011
by
Hugo Hamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Silex] added missing PHPDoc blocks.
parent
20eeadbc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
8 deletions
+45
-8
src/Silex/Application.php
src/Silex/Application.php
+14
-4
src/Silex/Compiler.php
src/Silex/Compiler.php
+5
-0
src/Silex/Controller.php
src/Silex/Controller.php
+14
-2
src/Silex/HttpCache.php
src/Silex/HttpCache.php
+5
-0
src/Silex/LazyUrlMatcher.php
src/Silex/LazyUrlMatcher.php
+5
-0
src/Silex/StringResponseConverter.php
src/Silex/StringResponseConverter.php
+2
-2
No files found.
src/Silex/Application.php
View file @
46dc1dff
...
...
@@ -120,7 +120,7 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
* Registers a service provider.
*
* @param ServiceProviderInterface $provider A ServiceProviderInterface instance
* @param array $values
An array of values that customizes the provider
* @param array $values An array of values that customizes the provider
*/
public
function
register
(
ServiceProviderInterface
$provider
,
array
$values
=
array
())
{
...
...
@@ -313,8 +313,8 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
/**
* Mounts an application under the given route prefix.
*
* @param string
$prefix The route prefix
* @param ControllerCollection|ControllerProviderInterface $app
A ControllerCollection or an
ControllerProviderInterface instance
* @param string $prefix The route prefix
* @param ControllerCollection|ControllerProviderInterface $app
A ControllerCollection or a
ControllerProviderInterface instance
*/
public
function
mount
(
$prefix
,
$app
)
{
...
...
@@ -330,7 +330,7 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
}
/**
* Handles the request and deliver the response.
* Handles the request and deliver
s
the response.
*
* @param Request $request Request to process
*/
...
...
@@ -343,6 +343,12 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
$this
->
handle
(
$request
)
->
send
();
}
/**
* Handles the request and returns the response.
*
* @param Request $request Request to process
* @return Response
*/
public
function
handle
(
Request
$request
,
$type
=
HttpKernelInterface
::
MASTER_REQUEST
,
$catch
=
true
)
{
$this
->
beforeDispatched
=
false
;
...
...
@@ -356,6 +362,8 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
/**
* Handles onEarlyKernelRequest events.
*
* @param KernelEvent $event The event to handle
*/
public
function
onEarlyKernelRequest
(
KernelEvent
$event
)
{
...
...
@@ -369,6 +377,8 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
/**
* Handles onKernelRequest events.
*
* @param KernelEvent $event The event to handle
*/
public
function
onKernelRequest
(
KernelEvent
$event
)
{
...
...
src/Silex/Compiler.php
View file @
46dc1dff
...
...
@@ -24,6 +24,11 @@ class Compiler
{
protected
$version
;
/**
* Compiles the Silex source code into one single Phar file.
*
* @param string $pharFile Name of the output Phar file
*/
public
function
compile
(
$pharFile
=
'silex.phar'
)
{
if
(
file_exists
(
$pharFile
))
{
...
...
src/Silex/Controller.php
View file @
46dc1dff
...
...
@@ -38,6 +38,8 @@ class Controller
/**
* Gets the controller's route.
*
* @return Route
*/
public
function
getRoute
()
{
...
...
@@ -46,6 +48,8 @@ class Controller
/**
* Gets the controller's route name.
*
* @return string
*/
public
function
getRouteName
()
{
...
...
@@ -56,6 +60,7 @@ class Controller
* Sets the controller's route.
*
* @param string $routeName
* @return Controller $this The current Controller instance
*/
public
function
bind
(
$routeName
)
{
...
...
@@ -73,6 +78,7 @@ class Controller
*
* @param string $variable The variable name
* @param string $regexp The regexp to apply
* @return Controller $this The current Controller instance
*/
public
function
assert
(
$variable
,
$regexp
)
{
...
...
@@ -86,6 +92,7 @@ class Controller
*
* @param string $variable The variable name
* @param mixed $default The default value
* @return Controller $this The current Controller instance
*/
public
function
value
(
$variable
,
$default
)
{
...
...
@@ -99,6 +106,7 @@ class Controller
*
* @param string $variable The variable name
* @param mixed $callback A PHP callback that converts the original value
* @return Controller $this The current Controller instance
*/
public
function
convert
(
$variable
,
$callback
)
{
...
...
@@ -112,8 +120,8 @@ class Controller
/**
* Sets the requirement for the HTTP method.
*
* @param string $method The HTTP method name. Multiple methods can be supplied,
*
delimited by a pipe character '|', eg. 'GET|POST'.
* @param string $method The HTTP method name. Multiple methods can be supplied,
delimited by a pipe character '|', eg. 'GET|POST'.
*
@return Controller $this The current Controller instance
*/
public
function
method
(
$method
)
{
...
...
@@ -124,6 +132,8 @@ class Controller
/**
* Sets the requirement of HTTP (no HTTPS) on this controller.
*
* @return Controller $this The current Controller instance
*/
public
function
requireHttp
()
{
...
...
@@ -134,6 +144,8 @@ class Controller
/**
* Sets the requirement of HTTPS on this controller.
*
* @return Controller $this The current Controller instance
*/
public
function
requireHttps
()
{
...
...
src/Silex/HttpCache.php
View file @
46dc1dff
...
...
@@ -21,6 +21,11 @@ use Symfony\Component\HttpFoundation\Request;
*/
class
HttpCache
extends
BaseHttpCache
{
/**
* Handles the Request and delivers the Response.
*
* @param Request $request The Request objet
*/
public
function
run
(
Request
$request
=
null
)
{
if
(
null
===
$request
)
{
...
...
src/Silex/LazyUrlMatcher.php
View file @
46dc1dff
...
...
@@ -29,6 +29,11 @@ class LazyUrlMatcher implements UrlMatcherInterface
$this
->
factory
=
$factory
;
}
/**
* Returns the corresponding UrlMatcherInterface instance.
*
* @return UrlMatcherInterface
*/
public
function
getUrlMatcher
()
{
$urlMatcher
=
call_user_func
(
$this
->
factory
);
...
...
src/Silex/StringResponseConverter.php
View file @
46dc1dff
...
...
@@ -23,9 +23,9 @@ class StringResponseConverter
/**
* Does the conversion
*
* @param $response The response string
* @param
string
$response The response string
*
* @return A
r
esponse object
* @return A
R
esponse object
*/
public
function
convert
(
$response
)
{
...
...
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