PHP Classes

File: src/Silex/Application.php

Recommend this page to a friend!
  Classes of Rafael Espinosa   Silex Enhanced   src/Silex/Application.php   Download  
File: src/Silex/Application.php
Role: Application script
Content type: text/plain
Description: Application script
Class: Silex Enhanced
Silex with custom services providers.
Author: By
Last change: Added getService method
Date: 9 years ago
Size: 1,149 bytes
 

Contents

Class file image Download
<?php
/**
 * PHP version ~5.5
 *
 * @category Application
 * @package Fluency\Silex
 * @author Rafael Ernesto Espinosa Santiesteban <ralphlnx@gmail.com>
 * @license MIT <http://www.opensource.org/licenses/mit-license.php>
 * @link http://fluency.inc.com
 */

namespace Fluency\Silex;


use
Silex\Application as BaseApplication;

/**
 * Class Application
 *
 * @category Application
 * @package Fluency\Silex
 * @author Rafael Ernesto Espinosa Santiesteban <ralphlnx@gmail.com>
 * @license MIT <http://www.opensource.org/licenses/mit-license.php>
 * @link http://fluency.inc.com
 */
class Application extends BaseApplication
{

   
/**
     * Gets parameter from container by name
     *
     * @param string $parameterName The parameter name
     *
     * @return mixed
     */
   
public function getParameter($parameterName)
    {
        return
$this['config']['parameters'][$parameterName];
    }

   
/**
     * Gets service from container
     *
     * @param string $serviceName The service name
     *
     * @return mixed
     */
   
public function getService($serviceName)
    {
        return
$this[$serviceName];
    }
}