public function register(\Silex\Application $app)
    {
        parent::register($app);

        // Register voters
        $app->extend('security.voters', function($voters) {
            return array_merge($voters, $this->voters);
        });

        // Add reference to this in application instance
        $this->app = $app;
        $this->app['securilex'] = $this;
    }
public function register(\Silex\Application $app)
    {
        parent::register($app);

        // Register voters
        $app->extend('security.voters', function($voters) {
            return array_merge($voters, $this->voters);
        });

        // Add reference to this in application instance
        $this->app = $app;
        $this->app['securilex'] = $this;
    }
public function register ( \ Silex \ Application $ app ) { parent :: register ( $ app ) ; // Register voters $ app -> extend ( 'security.voters' , function ( $ voters ) { return array_merge ( $ voters , $ this -> voters ) ; } ) ; // Add reference to this in application instance $ this -> app = $ app ; $ this -> app [ 'securilex' ] = $ this ; }
Register with \Silex\Application.
@param \Silex\Application $app
Register with \ Silex \ Application .