public function register(Application $app) { $this->app = $app; $that = $this; $app['tags'] = $app->share(function () use($app, $that) { return $that; }); $app->addModifier('tags', 'storeTags'); $app->addPostModifier('tags', 'createTags'); if (isset($app['tags.decorator'])) { $this->decorator = $app['tags.decorator']; } }
<?php require_once __DIR__ . '/app/autoload.php'; use Cazalla\Application; $app = new Application(); $app->make();