Example #1
0
 /**
  * @param Application $app
  */
 public function main(Application $app)
 {
     parent::main($app);
     $app->on('init', function ($event, $app) {
         $app['rss'] = function () use($app) {
             return new RSSApp($app);
         };
     }, -5);
     $this['controllers']->add($this);
 }
Example #2
0
 /**
  * @param Application $app
  */
 public function main(Application $app)
 {
     parent::main($app);
     $app->on('init', function ($event, $app) {
         $app['twitter'] = function () use($app) {
             $credentials = $app['plugins']->get('content/twitter')->config['credentials'];
             return new TwitterOAuth($app, $credentials);
         };
     }, -5);
     $this['controllers']->add($this);
 }