ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Slim Class Reference
+ Inheritance diagram for Slim:
+ Collaboration diagram for Slim:

Public Member Functions

 __construct ( $userSettings=array())
 Constructor. More...
 
 getMode ()
 Get application mode. More...
 
 setName ( $name)
 Set Slim application name. More...
 
 getName ()
 Get Slim application name. More...
 
 getLog ()
 Get application Log (lazy-loaded) More...
 
 configureMode ( $mode, $callable)
 Configure Slim for a given mode. More...
 
 config ( $name, $value=null)
 Configure Slim Settings. More...
 
 map ()
 Add generic route without associated HTTP method. More...
 
 get ()
 Add GET route. More...
 
 post ()
 Add POST route. More...
 
 put ()
 Add PUT route. More...
 
 delete ()
 Add DELETE route. More...
 
 options ()
 Add OPTIONS route. More...
 
 notFound ( $callable=null)
 Not Found Handler. More...
 
 error ( $argument=null)
 Error Handler. More...
 
 request ()
 Get the Request object. More...
 
 response ()
 Get the Response object. More...
 
 router ()
 Get the Router object. More...
 
 view ( $viewClass=null)
 Get and/or set the View. More...
 
 render ( $template, $data=array(), $status=null)
 Render a template. More...
 
 lastModified ( $time)
 Set Last-Modified HTTP Response Header. More...
 
 etag ( $value, $type='strong')
 Set ETag HTTP Response Header. More...
 
 setCookie ( $name, $value, $time=null, $path=null, $domain=null, $secure=null, $httponly=null)
 Set a normal, unencrypted Cookie. More...
 
 getCookie ( $name)
 Get the value of a Cookie from the current HTTP Request. More...
 
 setEncryptedCookie ( $name, $value, $time=null, $path=null, $domain=null, $secure=null, $httponly=null)
 Set an encrypted Cookie. More...
 
 getEncryptedCookie ( $name)
 Get the value of an encrypted Cookie from the current HTTP request. More...
 
 deleteCookie ( $name, $path=null, $domain=null, $secure=null, $httponly=null)
 Delete a Cookie (for both normal or encrypted Cookies) More...
 
 root ()
 Get the Slim application's absolute directory path. More...
 
 stop ()
 Stop. More...
 
 halt ( $status, $message='')
 Halt. More...
 
 pass ()
 Pass. More...
 
 contentType ( $type)
 Set the HTTP response Content-Type. More...
 
 status ( $code)
 Set the HTTP response status code. More...
 
 urlFor ( $name, $params=array())
 Get the URL for a named Route. More...
 
 redirect ( $url, $status=302)
 Redirect. More...
 
 flash ( $key, $value)
 Set flash message for subsequent request. More...
 
 flashNow ( $key, $value)
 Set flash message for current request. More...
 
 flashKeep ()
 Keep flash messages from previous request for subsequent request. More...
 
 hook ( $name, $callable, $priority=10)
 Assign hook. More...
 
 applyHook ( $name, $hookArg=null)
 Invoke hook. More...
 
 getHooks ( $name=null)
 Get hook listeners. More...
 
 clearHooks ( $name=null)
 Clear hook listeners. More...
 
 run ()
 Run the Slim application. More...
 

Static Public Member Functions

static autoload ( $class)
 Slim auto-loader. More...
 
static getInstance ( $name='default')
 Get Slim application with name. More...
 
static handleErrors ( $errno, $errstr='', $errfile='', $errline='')
 Handle errors. More...
 

Protected Member Functions

 mapRoute ($args)
 Add GET|POST|PUT|DELETE route. More...
 
 defaultNotFound ()
 Default Not Found handler. More...
 
 defaultError ()
 Default Error handler. More...
 

Static Protected Member Functions

static generateErrorMarkup ( $message, $file='', $line='', $trace='')
 Generate markup for error message. More...
 
static generateTemplateMarkup ( $title, $body)
 Generate default template markup. More...
 

Protected Attributes

 $name
 
 $request
 
 $response
 
 $router
 
 $view
 
 $log
 
 $settings
 
 $mode
 
 $hooks
 

Static Protected Attributes

static $apps = array()
 

Detailed Description

Definition at line 71 of file Slim.php.

Constructor & Destructor Documentation

◆ __construct()

Slim::__construct (   $userSettings = array())

Constructor.

Parameters
array$userSettings
Returns
void

Definition at line 156 of file Slim.php.

References array, config(), getMode(), request(), response(), router(), setName(), settings(), and view().

156  {
157  //Merge application settings
158  $this->settings = array_merge(array(
159  //Mode
160  'mode' => 'development',
161  //Logging
162  'log.enable' => false,
163  'log.logger' => null,
164  'log.path' => './logs',
165  'log.level' => 4,
166  //Debugging
167  'debug' => true,
168  //View
169  'templates.path' => './templates',
170  'view' => 'Slim_View',
171  //Settings for all cookies
172  'cookies.lifetime' => '20 minutes',
173  'cookies.path' => '/',
174  'cookies.domain' => '',
175  'cookies.secure' => false,
176  'cookies.httponly' => false,
177  //Settings for encrypted cookies
178  'cookies.secret_key' => 'CHANGE_ME',
179  'cookies.cipher' => MCRYPT_RIJNDAEL_256,
180  'cookies.cipher_mode' => MCRYPT_MODE_CBC,
181  'cookies.encrypt' => true,
182  'cookies.user_id' => 'DEFAULT',
183  //Session handler
184  'session.handler' => new Slim_Session_Handler_Cookies(),
185  'session.flash_key' => 'flash',
186  //HTTP
187  'http.version' => null
188  ), $userSettings);
189 
190  //Determine application mode
191  $this->getMode();
192 
193  //Setup HTTP request and response handling
194  $this->request = new Slim_Http_Request();
195  $this->response = new Slim_Http_Response($this->request);
196  $this->response->setCookieJar(new Slim_Http_CookieJar($this->settings['cookies.secret_key'], array(
197  'high_confidentiality' => $this->settings['cookies.encrypt'],
198  'mcrypt_algorithm' => $this->settings['cookies.cipher'],
199  'mcrypt_mode' => $this->settings['cookies.cipher_mode'],
200  'enable_ssl' => $this->settings['cookies.secure']
201  )));
202  $this->response->httpVersion($this->settings['http.version']);
203  $this->router = new Slim_Router($this->request);
204 
205  //Start session if not already started
206  if ( session_id() === '' ) {
207  $sessionHandler = $this->config('session.handler');
208  if ( $sessionHandler instanceof Slim_Session_Handler ) {
209  $sessionHandler->register($this);
210  }
211  session_cache_limiter(false);
212  session_start();
213  }
214 
215  //Setup view with flash messaging
216  $this->view($this->config('view'))->setData('flash', new Slim_Session_Flash($this->config('session.flash_key')));
217 
218  //Set app name
219  if ( !isset(self::$apps['default']) ) {
220  $this->setName('default');
221  }
222 
223  //Set global Error handler after Slim app instantiated
224  set_error_handler(array('Slim', 'handleErrors'));
225  }
view( $viewClass=null)
Get and/or set the View.
Definition: Slim.php:569
config( $name, $value=null)
Configure Slim Settings.
Definition: Slim.php:335
getMode()
Get application mode.
Definition: Slim.php:231
setName( $name)
Set Slim application name.
Definition: Slim.php:263
Create styles array
The data for the language used.
router()
Get the Router object.
Definition: Slim.php:549
request()
Get the Request object.
Definition: Slim.php:533
response()
Get the Response object.
Definition: Slim.php:541
settings()
Definition: settings.php:2
Slim - a micro PHP 5 framework.
Definition: CookieJar.php:54
+ Here is the call graph for this function:

Member Function Documentation

◆ applyHook()

Slim::applyHook (   $name,
  $hookArg = null 
)

Invoke hook.

Parameters
string$nameThe hook name
mixed$hookArgs(Optional) Argument for hooked functions
Returns
mixed

Definition at line 957 of file Slim.php.

References $name, and array.

Referenced by run().

957  {
958  if ( !isset($this->hooks[$name]) ) {
959  $this->hooks[$name] = array(array());
960  }
961  if( !empty($this->hooks[$name]) ) {
962  // Sort by priority, low to high, if there's more than one priority
963  if ( count($this->hooks[$name]) > 1 ) {
964  ksort($this->hooks[$name]);
965  }
966  foreach( $this->hooks[$name] as $priority ) {
967  if( !empty($priority) ) {
968  foreach($priority as $callable) {
969  $hookArg = call_user_func($callable, $hookArg);
970  }
971  }
972  }
973  return $hookArg;
974  }
975  }
$name
Definition: Slim.php:81
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ autoload()

static Slim::autoload (   $class)
static

Slim auto-loader.

This method lazy-loads class files when a given class if first used. Class files must exist in the same directory as this file and be named the same as its class definition (excluding the dot and extension).

Returns
void

Definition at line 139 of file Slim.php.

References $file.

139  {
140  if ( strpos($class, 'Slim') !== 0 ) {
141  return;
142  }
143  $file = dirname(__FILE__) . '/' . str_replace('_', DIRECTORY_SEPARATOR, substr($class,5)) . '.php';
144  if ( file_exists($file) ) {
145  require $file;
146  }
147  }
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file

◆ clearHooks()

Slim::clearHooks (   $name = null)

Clear hook listeners.

Clear all listeners for all hooks. If $name is a valid hook name, only the listeners attached to that hook will be cleared.

Parameters
string$nameA hook name (Optional)
Returns
void

Definition at line 1006 of file Slim.php.

References $name, array, and string.

1006  {
1007  if ( !is_null($name) && isset($this->hooks[(string)$name]) ) {
1008  $this->hooks[(string)$name] = array(array());
1009  } else {
1010  foreach( $this->hooks as $key => $value ) {
1011  $this->hooks[$key] = array(array());
1012  }
1013  }
1014  }
Add rich text string
The name of the decorator.
$name
Definition: Slim.php:81
Create styles array
The data for the language used.

◆ config()

Slim::config (   $name,
  $value = null 
)

Configure Slim Settings.

This method defines application settings and acts as a setter and a getter.

If only one argument is specified and that argument is a string, the value of the setting identified by the first argument will be returned, or NULL if that setting does not exist.

If only one argument is specified and that argument is an associative array, the array will be merged into the existing application settings.

If two arguments are provided, the first argument is the name of the setting to be created or updated, and the second argument is the setting value.

Parameters
string | array$nameIf a string, the name of the setting to set or retrieve. Else an associated array of setting names and values
mixed$valueIf name is a string, the value of the setting identified by $name
Returns
mixed The value of a setting if only one argument is a string

Definition at line 335 of file Slim.php.

References $name, and settings().

Referenced by __construct(), deleteCookie(), getLog(), getMode(), run(), setCookie(), setEncryptedCookie(), and view().

335  {
336  if ( func_num_args() === 1 ) {
337  if ( is_array($name) ) {
338  $this->settings = array_merge($this->settings, $name);
339  } else {
340  return in_array($name, array_keys($this->settings)) ? $this->settings[$name] : null;
341  }
342  } else {
343  $this->settings[$name] = $value;
344  }
345  }
$name
Definition: Slim.php:81
settings()
Definition: settings.php:2
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ configureMode()

Slim::configureMode (   $mode,
  $callable 
)

Configure Slim for a given mode.

This method will immediately invoke the callable if the specified mode matches the current application mode. Otherwise, the callable is ignored. This should be called only after you initialize your Slim app.

Parameters
string$mode
mixed$callable
Returns
void

Definition at line 310 of file Slim.php.

References $mode, and getMode().

310  {
311  if ( $mode === $this->getMode() && is_callable($callable) ) {
312  call_user_func($callable);
313  }
314  }
getMode()
Get application mode.
Definition: Slim.php:231
$mode
Definition: Slim.php:116
+ Here is the call graph for this function:

◆ contentType()

Slim::contentType (   $type)

Set the HTTP response Content-Type.

Parameters
string$typeThe Content-Type for the Response (ie. text/html)
Returns
void

Definition at line 855 of file Slim.php.

References response().

855  {
856  $this->response->header('Content-Type', $type);
857  }
response()
Get the Response object.
Definition: Slim.php:541
+ Here is the call graph for this function:

◆ defaultError()

Slim::defaultError ( )
protected

Default Error handler.

Returns
void

Definition at line 1165 of file Slim.php.

1165  {
1166  echo self::generateTemplateMarkup('Error', '<p>A website error has occured. The website administrator has been notified of the issue. Sorry for the temporary inconvenience.</p>');
1167  }

◆ defaultNotFound()

Slim::defaultNotFound ( )
protected

Default Not Found handler.

Returns
void

Definition at line 1157 of file Slim.php.

References request().

1157  {
1158  echo self::generateTemplateMarkup('404 Page Not Found', '<p>The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.</p><a href="' . $this->request->getRootUri() . '">Visit the Home Page</a>');
1159  }
request()
Get the Request object.
Definition: Slim.php:533
+ Here is the call graph for this function:

◆ delete()

Slim::delete ( )

Add DELETE route.

See also
Slim::mapRoute
Returns
Slim_Route

Definition at line 434 of file Slim.php.

References mapRoute(), and Slim_Http_Request\METHOD_DELETE.

434  {
435  $args = func_get_args();
436  return $this->mapRoute($args)->via(Slim_Http_Request::METHOD_DELETE);
437  }
const METHOD_DELETE
Definition: Request.php:54
mapRoute($args)
Add GET|POST|PUT|DELETE route.
Definition: Slim.php:379
+ Here is the call graph for this function:

◆ deleteCookie()

Slim::deleteCookie (   $name,
  $path = null,
  $domain = null,
  $secure = null,
  $httponly = null 
)

Delete a Cookie (for both normal or encrypted Cookies)

Remove a Cookie from the client. This method will overwrite an existing Cookie with a new, empty, auto-expiring Cookie. This method's arguments must match the original Cookie's respective arguments for the original Cookie to be removed. If any of this method's arguments are omitted or set to NULL, the default Cookie setting values (set during Slim::init) will be used instead.

Parameters
string$nameThe cookie name
string$pathThe path on the server in which the cookie will be available on
string$domainThe domain that the cookie is available to
bool$secureIndicates that the cookie should only be transmitted over a secure HTTPS connection from the client
bool$httponlyWhen TRUE the cookie will be made accessible only through the HTTP protocol
Returns
void

Definition at line 766 of file Slim.php.

References $name, $path, config(), and response().

766  {
767  $path = is_null($path) ? $this->config('cookies.path') : $path;
768  $domain = is_null($domain) ? $this->config('cookies.domain') : $domain;
769  $secure = is_null($secure) ? $this->config('cookies.secure') : $secure;
770  $httponly = is_null($httponly) ? $this->config('cookies.httponly') : $httponly;
771  $this->response->getCookieJar()->deleteCookie( $name, $path, $domain, $secure, $httponly );
772  }
$path
Definition: aliased.php:25
config( $name, $value=null)
Configure Slim Settings.
Definition: Slim.php:335
$name
Definition: Slim.php:81
response()
Get the Response object.
Definition: Slim.php:541
+ Here is the call graph for this function:

◆ error()

Slim::error (   $argument = null)

Error Handler.

This method defines or invokes the application-wide Error handler. There are two contexts in which this method may be invoked:

  1. When declaring the handler:

If the $argument parameter is callable, this method will register the callable to be invoked when an uncaught Exception is detected, or when otherwise explicitly invoked. The handler WILL NOT be invoked in this context.

  1. When invoking the handler:

If the $argument parameter is not callable, Slim assumes you want to invoke an already-registered handler. If the handler has been registered and is callable, it is invoked and passed the caught Exception as its one and only argument. The error handler's output is captured into an output buffer and sent as the body of a 500 HTTP Response.

Parameters
mixed$argumentCallable|Exception
Returns
void

Definition at line 510 of file Slim.php.

References array, halt(), and router().

Referenced by run().

510  {
511  if ( is_callable($argument) ) {
512  //Register error handler
513  $this->router->error($argument);
514  } else {
515  //Invoke error handler
516  ob_start();
517  $customErrorHandler = $this->router->error();
518  if ( is_callable($customErrorHandler) ) {
519  call_user_func_array($customErrorHandler, array($argument));
520  } else {
521  call_user_func_array(array($this, 'defaultError'), array($argument));
522  }
523  $this->halt(500, ob_get_clean());
524  }
525  }
Create styles array
The data for the language used.
router()
Get the Router object.
Definition: Slim.php:549
halt( $status, $message='')
Halt.
Definition: Slim.php:823
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ etag()

Slim::etag (   $value,
  $type = 'strong' 
)

Set ETag HTTP Response Header.

Set the etag header and stop if the conditional GET request matches. The value argument is a unique identifier for the current resource. The type argument indicates whether the etag should be used as a strong or weak cache validator.

When the current request includes an 'If-None-Match' header with a matching etag, execution is immediately stopped. If the request method is GET or HEAD, a '304 Not Modified' response is sent.

Parameters
string$valueThe etag value
string$typeThe type of etag to create; either "strong" or "weak"
Exceptions
InvalidArgumentExceptionIf provided type is invalid
Returns
void

Definition at line 649 of file Slim.php.

References array, halt(), request(), and response().

649  {
650 
651  //Ensure type is correct
652  if ( !in_array($type, array('strong', 'weak')) ) {
653  throw new InvalidArgumentException('Invalid Slim::etag type. Expected "strong" or "weak".');
654  }
655 
656  //Set etag value
657  $value = '"' . $value . '"';
658  if ( $type === 'weak' ) $value = 'W/'.$value;
659  $this->response->header('ETag', $value);
660 
661  //Check conditional GET
662  if ( $etagsHeader = $this->request->headers('IF_NONE_MATCH')) {
663  $etags = preg_split('@\s*,\s*@', $etagsHeader);
664  if ( in_array($value, $etags) || in_array('*', $etags) ) $this->halt(304);
665  }
666 
667  }
Create styles array
The data for the language used.
request()
Get the Request object.
Definition: Slim.php:533
response()
Get the Response object.
Definition: Slim.php:541
halt( $status, $message='')
Halt.
Definition: Slim.php:823
+ Here is the call graph for this function:

◆ flash()

Slim::flash (   $key,
  $value 
)

Set flash message for subsequent request.

Parameters
string$key
mixed$value
Returns
void

Definition at line 911 of file Slim.php.

References view().

911  {
912  $this->view->getData('flash')->set($key, $value);
913  }
view( $viewClass=null)
Get and/or set the View.
Definition: Slim.php:569
+ Here is the call graph for this function:

◆ flashKeep()

Slim::flashKeep ( )

Keep flash messages from previous request for subsequent request.

Returns
void

Definition at line 929 of file Slim.php.

References view().

929  {
930  $this->view->getData('flash')->keep();
931  }
view( $viewClass=null)
Get and/or set the View.
Definition: Slim.php:569
+ Here is the call graph for this function:

◆ flashNow()

Slim::flashNow (   $key,
  $value 
)

Set flash message for current request.

Parameters
string$key
mixed$value
Returns
void

Definition at line 921 of file Slim.php.

References view().

921  {
922  $this->view->getData('flash')->now($key, $value);
923  }
view( $viewClass=null)
Get and/or set the View.
Definition: Slim.php:569
+ Here is the call graph for this function:

◆ generateErrorMarkup()

static Slim::generateErrorMarkup (   $message,
  $file = '',
  $line = '',
  $trace = '' 
)
staticprotected

Generate markup for error message.

This method accepts details about an error or exception and generates HTML markup for the 500 response body that will be sent to the client.

Parameters
string$messageThe error message
string$fileThe absolute file path to the affected file
int$lineThe line number in the affected file
string$traceA stack trace of the error
Returns
string

Definition at line 1125 of file Slim.php.

References $file.

1125  {
1126  $body = '<p>The application could not run because of the following error:</p>';
1127  $body .= "<h2>Details:</h2><strong>Message:</strong> $message<br/>";
1128  if ( $file !== '' ) $body .= "<strong>File:</strong> $file<br/>";
1129  if ( $line !== '' ) $body .= "<strong>Line:</strong> $line<br/>";
1130  if ( $trace !== '' ) $body .= '<h2>Stack Trace:</h2>' . nl2br($trace);
1131  return self::generateTemplateMarkup('Slim Application Error', $body);
1132  }
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file

◆ generateTemplateMarkup()

static Slim::generateTemplateMarkup (   $title,
  $body 
)
staticprotected

Generate default template markup.

This method accepts a title and body content to generate an HTML page. This is primarily used to generate the layout markup for Error handlers and Not Found handlers.

Parameters
string$titleThe title of the HTML template
string$bodyThe body content of the HTML template
Returns
string

Definition at line 1145 of file Slim.php.

References $html.

1145  {
1146  $html = "<html><head><title>$title</title><style>body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif;}h1{margin:0;font-size:48px;font-weight:normal;line-height:48px;}strong{display:inline-block;width:65px;}</style></head><body>";
1147  $html .= "<h1>$title</h1>";
1148  $html .= $body;
1149  $html .= '</body></html>';
1150  return $html;
1151  }
$html
Definition: example_001.php:87

◆ get()

Slim::get ( )

Add GET route.

See also
Slim::mapRoute
Returns
Slim_Route

Definition at line 404 of file Slim.php.

References mapRoute(), Slim_Http_Request\METHOD_GET, and Slim_Http_Request\METHOD_HEAD.

404  {
405  $args = func_get_args();
407  }
const METHOD_GET
Definition: Request.php:51
const METHOD_HEAD
Definition: Request.php:50
mapRoute($args)
Add GET|POST|PUT|DELETE route.
Definition: Slim.php:379
+ Here is the call graph for this function:

◆ getCookie()

Slim::getCookie (   $name)

Get the value of a Cookie from the current HTTP Request.

Return the value of a cookie from the current HTTP request, or return NULL if cookie does not exist. Cookies created during the current request will not be available until the next request.

Parameters
string$name
Returns
string|null

Definition at line 705 of file Slim.php.

References $name, and request().

705  {
706  return $this->request->cookies($name);
707  }
$name
Definition: Slim.php:81
request()
Get the Request object.
Definition: Slim.php:533
+ Here is the call graph for this function:

◆ getEncryptedCookie()

Slim::getEncryptedCookie (   $name)

Get the value of an encrypted Cookie from the current HTTP request.

Return the value of an encrypted cookie from the current HTTP request, or return NULL if cookie does not exist. Encrypted cookies created during the current request will not be available until the next request.

Parameters
string$name
Returns
string|null

Definition at line 744 of file Slim.php.

References $name, and response().

744  {
745  $value = $this->response->getCookieJar()->getCookieValue($name);
746  return ($value === false) ? null : $value;
747  }
$name
Definition: Slim.php:81
response()
Get the Response object.
Definition: Slim.php:541
+ Here is the call graph for this function:

◆ getHooks()

Slim::getHooks (   $name = null)

Get hook listeners.

Return an array of registered hooks. If $name is a valid hook name, only the listeners attached to that hook are returned. Else, all listeners are returned as an associative array whose keys are hook names and whose values are arrays of listeners.

Parameters
string$nameA hook name (Optional)
Returns
array|null

Definition at line 988 of file Slim.php.

References $hooks, $name, and string.

988  {
989  if ( !is_null($name) ) {
990  return isset($this->hooks[(string)$name]) ? $this->hooks[(string)$name] : null;
991  } else {
992  return $this->hooks;
993  }
994  }
$hooks
Definition: Slim.php:121
Add rich text string
The name of the decorator.
$name
Definition: Slim.php:81

◆ getInstance()

static Slim::getInstance (   $name = 'default')
static

Get Slim application with name.

Parameters
string$nameThe name of the Slim application to fetch
Returns
Slim|null

Definition at line 254 of file Slim.php.

References $name, and string.

Referenced by ilRestFileStorage\checkWebserviceActivation(), ilRestFileStorage\createFile(), ilRestFileStorage\getFile(), and ilRestFileStorage\responeNotFound().

254  {
255  return isset(self::$apps[(string)$name]) ? self::$apps[(string)$name] : null;
256  }
Add rich text string
The name of the decorator.
$name
Definition: Slim.php:81
+ Here is the caller graph for this function:

◆ getLog()

Slim::getLog ( )

Get application Log (lazy-loaded)

Returns
Slim_Log

Definition at line 282 of file Slim.php.

References $log, and config().

Referenced by run().

282  {
283  if ( !isset($this->log) ) {
284  $this->log = new Slim_Log();
285  $this->log->setEnabled($this->config('log.enable'));
286  $logger = $this->config('log.logger');
287  if ( $logger ) {
288  $this->log->setLogger($logger);
289  } else {
290  $this->log->setLogger(new Slim_Logger($this->config('log.path'), $this->config('log.level')));
291  }
292  }
293  return $this->log;
294  }
config( $name, $value=null)
Configure Slim Settings.
Definition: Slim.php:335
Definition: Log.php:53
$log
Definition: Slim.php:106
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMode()

Slim::getMode ( )

Get application mode.

Returns
string

Definition at line 231 of file Slim.php.

References $mode, config(), and string.

Referenced by __construct(), and configureMode().

231  {
232  if ( !isset($this->mode) ) {
233  if ( isset($_ENV['SLIM_MODE']) ) {
234  $this->mode = (string)$_ENV['SLIM_MODE'];
235  } else {
236  $envMode = getenv('SLIM_MODE');
237  if ( $envMode !== false ) {
238  $this->mode = $envMode;
239  } else {
240  $this->mode = (string)$this->config('mode');
241  }
242  }
243  }
244  return $this->mode;
245  }
config( $name, $value=null)
Configure Slim Settings.
Definition: Slim.php:335
Add rich text string
The name of the decorator.
$mode
Definition: Slim.php:116
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getName()

Slim::getName ( )

Get Slim application name.

Returns
string|null

Definition at line 272 of file Slim.php.

References $name.

272  {
273  return $this->name;
274  }
$name
Definition: Slim.php:81

◆ halt()

Slim::halt (   $status,
  $message = '' 
)

Halt.

Halt the application and immediately send an HTTP response with a specific status code and body. This may be used to send any type of response: info, success, redirect, client error, or server error. If you need to render a template AND customize the response status, you should use Slim::render() instead.

Parameters
int$statusThe HTTP response status
string$messageThe HTTP response body
Returns
void

Definition at line 823 of file Slim.php.

References response(), and stop().

Referenced by error(), etag(), lastModified(), notFound(), redirect(), and run().

823  {
824  if ( ob_get_level() !== 0 ) {
825  ob_clean();
826  }
827  $this->response->status($status);
828  $this->response->body($message);
829  $this->stop();
830  }
stop()
Stop.
Definition: Slim.php:800
response()
Get the Response object.
Definition: Slim.php:541
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleErrors()

static Slim::handleErrors (   $errno,
  $errstr = '',
  $errfile = '',
  $errline = '' 
)
static

Handle errors.

This is the global Error handler that will catch reportable Errors and convert them into ErrorExceptions that are caught and handled by each Slim application.

Parameters
int$errnoThe numeric type of the Error
string$errstrThe error message
string$errfileThe absolute path to the affected file
int$errlineThe line number of the error in the affected file
Returns
true
Exceptions
ErrorException

Definition at line 1105 of file Slim.php.

1105  {
1106  if ( error_reporting() & $errno ) {
1107  throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
1108  }
1109  return true;
1110  }

◆ hook()

Slim::hook (   $name,
  $callable,
  $priority = 10 
)

Assign hook.

Parameters
string$nameThe hook name
mixed$callableA callable object
int$priorityThe hook priority; 0 = high, 10 = low
Returns
void

Definition at line 942 of file Slim.php.

References $name, and array.

942  {
943  if ( !isset($this->hooks[$name]) ) {
944  $this->hooks[$name] = array(array());
945  }
946  if ( is_callable($callable) ) {
947  $this->hooks[$name][(int)$priority][] = $callable;
948  }
949  }
$name
Definition: Slim.php:81
Create styles array
The data for the language used.

◆ lastModified()

Slim::lastModified (   $time)

Set Last-Modified HTTP Response Header.

Set the HTTP 'Last-Modified' header and stop if a conditional GET request's If-Modified-Since header matches the last modified time of the resource. The time argument is a UNIX timestamp integer value. When the current request includes an 'If-Modified-Since' header that matches the specified last modified time, the application will stop and send a '304 Not Modified' response to the client.

Parameters
int$timeThe last modified UNIX timestamp
Exceptions
SlimExceptionReturns HTTP 304 Not Modified response if resource last modified time matches If-Modified-Since header
InvalidArgumentExceptionIf provided timestamp is not an integer
Returns
void

Definition at line 623 of file Slim.php.

References date, halt(), request(), and response().

623  {
624  if ( is_integer($time) ) {
625  $this->response->header('Last-Modified', date(DATE_RFC1123, $time));
626  if ( $time === strtotime($this->request->headers('IF_MODIFIED_SINCE')) ) $this->halt(304);
627  } else {
628  throw new InvalidArgumentException('Slim::lastModified only accepts an integer UNIX timestamp value.');
629  }
630  }
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
request()
Get the Request object.
Definition: Slim.php:533
response()
Get the Response object.
Definition: Slim.php:541
halt( $status, $message='')
Halt.
Definition: Slim.php:823
+ Here is the call graph for this function:

◆ map()

Slim::map ( )

Add generic route without associated HTTP method.

See also
Slim::mapRoute
Returns
Slim_Route

Definition at line 394 of file Slim.php.

References mapRoute().

394  {
395  $args = func_get_args();
396  return $this->mapRoute($args);
397  }
mapRoute($args)
Add GET|POST|PUT|DELETE route.
Definition: Slim.php:379
+ Here is the call graph for this function:

◆ mapRoute()

Slim::mapRoute (   $args)
protected

Add GET|POST|PUT|DELETE route.

Adds a new route to the router with associated callable. This route will only be invoked when the HTTP request's method matches this route's method.

ARGUMENTS:

First: string The URL pattern (REQUIRED) In-Between: mixed Anything that returns TRUE for is_callable (OPTIONAL) Last: mixed Anything that returns TRUE for is_callable (REQUIRED)

The first argument is required and must always be the route pattern (ie. '/books/:id').

The last argument is required and must always be the callable object to be invoked when the route matches an HTTP request.

You may also provide an unlimited number of in-between arguments; each interior argument must be callable and will be invoked in the order specified before the route's callable is invoked.

USAGE:

Slim::get('/foo'[, middleware, middleware, ...], callable);

Parameters
array(See notes above)
Returns
Slim_Route

Definition at line 379 of file Slim.php.

References router().

Referenced by delete(), get(), map(), options(), post(), and put().

379  {
380  $pattern = array_shift($args);
381  $callable = array_pop($args);
382  $route = $this->router->map($pattern, $callable);
383  if ( count($args) > 0 ) {
384  $route->setMiddleware($args);
385  }
386  return $route;
387  }
router()
Get the Router object.
Definition: Slim.php:549
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ notFound()

Slim::notFound (   $callable = null)

Not Found Handler.

This method defines or invokes the application-wide Not Found handler. There are two contexts in which this method may be invoked:

  1. When declaring the handler:

If the $callable parameter is not null and is callable, this method will register the callable to be invoked when no routes match the current HTTP request. It WILL NOT invoke the callable.

  1. When invoking the handler:

If the $callable parameter is null, Slim assumes you want to invoke an already-registered handler. If the handler has been registered and is callable, it is invoked and sends a 404 HTTP Response whose body is the output of the Not Found handler.

Parameters
mixed$callableAnything that returns true for is_callable()
Returns
void

Definition at line 471 of file Slim.php.

References array, halt(), and router().

Referenced by run().

471  {
472  if ( !is_null($callable) ) {
473  $this->router->notFound($callable);
474  } else {
475  ob_start();
476  $customNotFoundHandler = $this->router->notFound();
477  if ( is_callable($customNotFoundHandler) ) {
478  call_user_func($customNotFoundHandler);
479  } else {
480  call_user_func(array($this, 'defaultNotFound'));
481  }
482  $this->halt(404, ob_get_clean());
483  }
484  }
Create styles array
The data for the language used.
router()
Get the Router object.
Definition: Slim.php:549
halt( $status, $message='')
Halt.
Definition: Slim.php:823
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ options()

Slim::options ( )

Add OPTIONS route.

See also
Slim::mapRoute
Returns
Slim_Route

Definition at line 444 of file Slim.php.

References mapRoute(), and Slim_Http_Request\METHOD_OPTIONS.

444  {
445  $args = func_get_args();
446  return $this->mapRoute($args)->via(Slim_Http_Request::METHOD_OPTIONS);
447  }
const METHOD_OPTIONS
Definition: Request.php:55
mapRoute($args)
Add GET|POST|PUT|DELETE route.
Definition: Slim.php:379
+ Here is the call graph for this function:

◆ pass()

Slim::pass ( )

Pass.

This method will cause the Router::dispatch method to ignore the current route and continue to the next matching route in the dispatch loop. If no subsequent mathing routes are found, a 404 Not Found response will be sent to the client.

Exceptions
Slim_Exception_Pass
Returns
void

Definition at line 843 of file Slim.php.

843  {
844  if ( ob_get_level() !== 0 ) {
845  ob_clean();
846  }
847  throw new Slim_Exception_Pass();
848  }

◆ post()

Slim::post ( )

Add POST route.

See also
Slim::mapRoute
Returns
Slim_Route

Definition at line 414 of file Slim.php.

References mapRoute(), and Slim_Http_Request\METHOD_POST.

Referenced by ilRestServer\init().

414  {
415  $args = func_get_args();
416  return $this->mapRoute($args)->via(Slim_Http_Request::METHOD_POST);
417  }
const METHOD_POST
Definition: Request.php:52
mapRoute($args)
Add GET|POST|PUT|DELETE route.
Definition: Slim.php:379
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ put()

Slim::put ( )

Add PUT route.

See also
Slim::mapRoute
Returns
Slim_Route

Definition at line 424 of file Slim.php.

References mapRoute(), and Slim_Http_Request\METHOD_PUT.

424  {
425  $args = func_get_args();
426  return $this->mapRoute($args)->via(Slim_Http_Request::METHOD_PUT);
427  }
const METHOD_PUT
Definition: Request.php:53
mapRoute($args)
Add GET|POST|PUT|DELETE route.
Definition: Slim.php:379
+ Here is the call graph for this function:

◆ redirect()

Slim::redirect (   $url,
  $status = 302 
)

Redirect.

This method immediately redirects to a new URL. By default, this issues a 302 Found response; this is considered the default generic redirect response. You may also specify another valid 3xx status code if you want. This method will automatically set the HTTP Location header for you using the URL parameter and place the destination URL into the response body.

Parameters
string$urlThe destination URL
int$statusThe HTTP redirect status code (Optional)
Exceptions
InvalidArgumentExceptionIf status parameter is not a valid 3xx status code
Returns
void

Definition at line 894 of file Slim.php.

References $url, halt(), and response().

Referenced by run().

894  {
895  if ( $status >= 300 && $status <= 307 ) {
896  $this->response->header('Location', (string)$url);
897  $this->halt($status, (string)$url);
898  } else {
899  throw new InvalidArgumentException('Slim::redirect only accepts HTTP 300-307 status codes.');
900  }
901  }
$url
Definition: shib_logout.php:72
response()
Get the Response object.
Definition: Slim.php:541
halt( $status, $message='')
Halt.
Definition: Slim.php:823
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ render()

Slim::render (   $template,
  $data = array(),
  $status = null 
)

Render a template.

Call this method within a GET, POST, PUT, DELETE, NOT FOUND, or ERROR callable to render a template whose output is appended to the current HTTP response body. How the template is rendered is delegated to the current View.

Parameters
string$templateThe name of the template passed into the View::render method
array$dataAssociative array of data made available to the View
int$statusThe HTTP response status code to use (Optional)
Returns
void

Definition at line 598 of file Slim.php.

References $data, response(), and view().

598  {
599  if ( !is_null($status) ) {
600  $this->response->status($status);
601  }
602  $this->view->appendData($data);
603  $this->view->display($template);
604  }
view( $viewClass=null)
Get and/or set the View.
Definition: Slim.php:569
response()
Get the Response object.
Definition: Slim.php:541
+ Here is the call graph for this function:

◆ request()

Slim::request ( )

Get the Request object.

Returns
Slim_Http_Request

Definition at line 533 of file Slim.php.

References $request.

Referenced by __construct(), defaultNotFound(), etag(), getCookie(), lastModified(), root(), and run().

533  {
534  return $this->request;
535  }
$request
Definition: Slim.php:86
+ Here is the caller graph for this function:

◆ response()

Slim::response ( )

Get the Response object.

Returns
Slim_Http_Response

Definition at line 541 of file Slim.php.

References $response.

Referenced by __construct(), contentType(), deleteCookie(), etag(), getEncryptedCookie(), halt(), lastModified(), redirect(), render(), run(), setCookie(), setEncryptedCookie(), status(), and stop().

541  {
542  return $this->response;
543  }
$response
Definition: Slim.php:91
+ Here is the caller graph for this function:

◆ root()

Slim::root ( )

Get the Slim application's absolute directory path.

This method returns the absolute path to the Slim application's directory. If the Slim application is installed in a public-accessible sub-directory, the sub-directory path will be included. This method will always return an absolute path WITH a trailing slash.

Returns
string

Definition at line 786 of file Slim.php.

References $_SERVER, and request().

786  {
787  return rtrim($_SERVER['DOCUMENT_ROOT'], '/') . rtrim($this->request->getRootUri(), '/') . '/';
788  }
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
request()
Get the Request object.
Definition: Slim.php:533
+ Here is the call graph for this function:

◆ router()

Slim::router ( )

Get the Router object.

Returns
Slim_Router

Definition at line 549 of file Slim.php.

References $router.

Referenced by __construct(), error(), mapRoute(), notFound(), run(), and urlFor().

549  {
550  return $this->router;
551  }
$router
Definition: Slim.php:96
+ Here is the caller graph for this function:

◆ run()

Slim::run ( )

Run the Slim application.

This method is the "meat and potatoes" of Slim and should be the last method called. This fires up Slim, invokes the Route that matches the current request, and returns the response to the client.

This method will invoke the Not Found handler if no matching routes are found.

This method will also catch any unexpected Exceptions thrown by this application; the Exceptions will be logged to this application's log and rethrown to the global Exception handler.

Returns
void

Definition at line 1034 of file Slim.php.

References applyHook(), array, config(), error(), getLog(), halt(), notFound(), redirect(), request(), response(), router(), and view().

1034  {
1035  try {
1036  try {
1037  $this->applyHook('slim.before');
1038  ob_start();
1039  $this->applyHook('slim.before.router');
1040  $dispatched = false;
1041  $httpMethod = $this->request()->getMethod();
1042  $httpMethodsAllowed = array();
1043  foreach ( $this->router as $route ) {
1044  if ( $route->supportsHttpMethod($httpMethod) ) {
1045  try {
1046  $this->applyHook('slim.before.dispatch');
1047  $dispatched = $route->dispatch();
1048  $this->applyHook('slim.after.dispatch');
1049  if ( $dispatched ) {
1050  break;
1051  }
1052  } catch ( Slim_Exception_Pass $e ) {
1053  continue;
1054  }
1055  } else {
1056  $httpMethodsAllowed = array_merge($httpMethodsAllowed, $route->getHttpMethods());
1057  }
1058  }
1059  if ( !$dispatched ) {
1060  if ( $httpMethodsAllowed ) {
1061  $this->response()->header('Allow', implode(' ', $httpMethodsAllowed));
1062  $this->halt(405);
1063  } else {
1064  $this->notFound();
1065  }
1066  }
1067  $this->response()->write(ob_get_clean());
1068  $this->applyHook('slim.after.router');
1069  $this->view->getData('flash')->save();
1070  session_write_close();
1071  $this->response->send();
1072  $this->applyHook('slim.after');
1073  } catch ( Slim_Exception_RequestSlash $e ) {
1074  $this->redirect($this->request->getRootUri() . $this->request->getResourceUri() . '/', 301);
1075  } catch ( Exception $e ) {
1076  if ( $e instanceof Slim_Exception_Stop ) throw $e;
1077  $this->getLog()->error($e);
1078  if ( $this->config('debug') === true ) {
1079  $this->halt(500, self::generateErrorMarkup($e->getMessage(), $e->getFile(), $e->getLine(), $e->getTraceAsString()));
1080  } else {
1081  $this->error($e);
1082  }
1083  }
1084  } catch ( Slim_Exception_Stop $e ) {
1085  //Exit application context
1086  }
1087  }
view( $viewClass=null)
Get and/or set the View.
Definition: Slim.php:569
error( $argument=null)
Error Handler.
Definition: Slim.php:510
config( $name, $value=null)
Configure Slim Settings.
Definition: Slim.php:335
notFound( $callable=null)
Not Found Handler.
Definition: Slim.php:471
redirect( $url, $status=302)
Redirect.
Definition: Slim.php:894
Create styles array
The data for the language used.
router()
Get the Router object.
Definition: Slim.php:549
request()
Get the Request object.
Definition: Slim.php:533
response()
Get the Response object.
Definition: Slim.php:541
getLog()
Get application Log (lazy-loaded)
Definition: Slim.php:282
applyHook( $name, $hookArg=null)
Invoke hook.
Definition: Slim.php:957
halt( $status, $message='')
Halt.
Definition: Slim.php:823
+ Here is the call graph for this function:

◆ setCookie()

Slim::setCookie (   $name,
  $value,
  $time = null,
  $path = null,
  $domain = null,
  $secure = null,
  $httponly = null 
)

Set a normal, unencrypted Cookie.

Parameters
string$nameThe cookie name
mixed$valueThe cookie value
mixed$timeThe duration of the cookie; If integer, should be UNIX timestamp; If string, converted to UNIX timestamp with strtotime;
string$pathThe path on the server in which the cookie will be available on
string$domainThe domain that the cookie is available to
bool$secureIndicates that the cookie should only be transmitted over a secure HTTPS connection to/from the client
bool$httponlyWhen TRUE the cookie will be made accessible only through the HTTP protocol
Returns
void

Definition at line 686 of file Slim.php.

References $name, $path, config(), and response().

686  {
687  $time = is_null($time) ? $this->config('cookies.lifetime') : $time;
688  $path = is_null($path) ? $this->config('cookies.path') : $path;
689  $domain = is_null($domain) ? $this->config('cookies.domain') : $domain;
690  $secure = is_null($secure) ? $this->config('cookies.secure') : $secure;
691  $httponly = is_null($httponly) ? $this->config('cookies.httponly') : $httponly;
692  $this->response->getCookieJar()->setClassicCookie($name, $value, $time, $path, $domain, $secure, $httponly);
693  }
$path
Definition: aliased.php:25
config( $name, $value=null)
Configure Slim Settings.
Definition: Slim.php:335
$name
Definition: Slim.php:81
response()
Get the Response object.
Definition: Slim.php:541
+ Here is the call graph for this function:

◆ setEncryptedCookie()

Slim::setEncryptedCookie (   $name,
  $value,
  $time = null,
  $path = null,
  $domain = null,
  $secure = null,
  $httponly = null 
)

Set an encrypted Cookie.

Parameters
string$nameThe cookie name
mixed$valueThe cookie value
mixed$timeThe duration of the cookie; If integer, should be UNIX timestamp; If string, converted to UNIX timestamp with strtotime;
string$pathThe path on the server in which the cookie will be available on
string$domainThe domain that the cookie is available to
bool$secureIndicates that the cookie should only be transmitted over a secure HTTPS connection from the client
bool$httponlyWhen TRUE the cookie will be made accessible only through the HTTP protocol
Returns
void

Definition at line 724 of file Slim.php.

References $name, $path, config(), and response().

724  {
725  $time = is_null($time) ? $this->config('cookies.lifetime') : $time;
726  $path = is_null($path) ? $this->config('cookies.path') : $path;
727  $domain = is_null($domain) ? $this->config('cookies.domain') : $domain;
728  $secure = is_null($secure) ? $this->config('cookies.secure') : $secure;
729  $httponly = is_null($httponly) ? $this->config('cookies.httponly') : $httponly;
730  $userId = $this->config('cookies.user_id');
731  $this->response->getCookieJar()->setCookie($name, $value, $userId, $time, $path, $domain, $secure, $httponly);
732  }
$path
Definition: aliased.php:25
config( $name, $value=null)
Configure Slim Settings.
Definition: Slim.php:335
$name
Definition: Slim.php:81
response()
Get the Response object.
Definition: Slim.php:541
+ Here is the call graph for this function:

◆ setName()

Slim::setName (   $name)

Set Slim application name.

Parameters
string$nameThe name of this Slim application
Returns
void

Definition at line 263 of file Slim.php.

References $name.

Referenced by __construct().

263  {
264  $this->name = $name;
265  self::$apps[$name] = $this;
266  }
$name
Definition: Slim.php:81
+ Here is the caller graph for this function:

◆ status()

Slim::status (   $code)

Set the HTTP response status code.

Parameters
int$statusThe HTTP response status code
Returns
void

Definition at line 864 of file Slim.php.

References $code, and response().

864  {
865  $this->response->status($code);
866  }
$code
Definition: example_050.php:99
response()
Get the Response object.
Definition: Slim.php:541
+ Here is the call graph for this function:

◆ stop()

Slim::stop ( )

Stop.

Send the current Response as is and stop executing the Slim application. The thrown exception will be caught by the Slim custom exception handler which exits this script.

Exceptions
Slim_Exception_Stop
Returns
void

Definition at line 800 of file Slim.php.

References response(), and view().

Referenced by halt().

800  {
801  $flash = $this->view->getData('flash');
802  if ( $flash ) {
803  $flash->save();
804  }
805  session_write_close();
806  $this->response->send();
807  throw new Slim_Exception_Stop();
808  }
view( $viewClass=null)
Get and/or set the View.
Definition: Slim.php:569
response()
Get the Response object.
Definition: Slim.php:541
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ urlFor()

Slim::urlFor (   $name,
  $params = array() 
)

Get the URL for a named Route.

Parameters
string$nameThe route name
array$paramsKey-value array of URL parameters
Exceptions
RuntimeExceptionIf named route does not exist
Returns
string

Definition at line 875 of file Slim.php.

References $name, $params, and router().

875  {
876  return $this->router->urlFor($name, $params);
877  }
$name
Definition: Slim.php:81
router()
Get the Router object.
Definition: Slim.php:549
$params
Definition: example_049.php:96
+ Here is the call graph for this function:

◆ view()

Slim::view (   $viewClass = null)

Get and/or set the View.

This method declares the View to be used by the Slim application. If the argument is a string, Slim will instantiate a new object of the same class. If the argument is an instance of View or a subclass of View, Slim will use the argument as the View.

If a View already exists and this method is called to create a new View, data already set in the existing View will be transferred to the new View.

Parameters
string | Slim_View$viewClassThe name of a Slim_View class; An instance of Slim_View;
Returns
Slim_View

Definition at line 569 of file Slim.php.

References $view, array, and config().

Referenced by __construct(), flash(), flashKeep(), flashNow(), render(), run(), and stop().

569  {
570  if ( !is_null($viewClass) ) {
571  $existingData = is_null($this->view) ? array() : $this->view->getData();
572  if ( $viewClass instanceOf Slim_View ) {
573  $this->view = $viewClass;
574  } else {
575  $this->view = new $viewClass();
576  }
577  $this->view->appendData($existingData);
578  $this->view->setTemplatesDirectory($this->config('templates.path'));
579  }
580  return $this->view;
581  }
view( $viewClass=null)
Get and/or set the View.
Definition: Slim.php:569
config( $name, $value=null)
Configure Slim Settings.
Definition: Slim.php:335
$view
Definition: Slim.php:101
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $apps

Slim::$apps = array()
staticprotected

Definition at line 76 of file Slim.php.

◆ $hooks

Slim::$hooks
protected
Initial value:
'slim.before' => array(array()),
'slim.before.router' => array(array()),
'slim.before.dispatch' => array(array()),
'slim.after.dispatch' => array(array()),
'slim.after.router' => array(array()),
'slim.after' => array(array())
)

Definition at line 121 of file Slim.php.

Referenced by getHooks().

◆ $log

Slim::$log
protected

Definition at line 106 of file Slim.php.

Referenced by getLog().

◆ $mode

Slim::$mode
protected

Definition at line 116 of file Slim.php.

Referenced by configureMode(), and getMode().

◆ $name

◆ $request

Slim::$request
protected

Definition at line 86 of file Slim.php.

Referenced by request().

◆ $response

Slim::$response
protected

Definition at line 91 of file Slim.php.

Referenced by response().

◆ $router

Slim::$router
protected

Definition at line 96 of file Slim.php.

Referenced by router().

◆ $settings

Slim::$settings
protected

Definition at line 111 of file Slim.php.

◆ $view

Slim::$view
protected

Definition at line 101 of file Slim.php.

Referenced by view().


The documentation for this class was generated from the following file: