public function runWebApp() { WebDelivery::quickResponse(IndexResource::class, WebApplication::init(function (WebApplication $app) { $app->name = 'ucdi'; $app->defaultAction = 'ShowDashboard'; $this->configureMenu($app); $this->registerActions($app); $this->registerLinks($app); }, WebDelivery::init())); }
/** * The WebDelivery needs to be initialized in order to use the CookieStore */ function testStoreIsInitializedAsSingleton() { $factory = WebDelivery::init(); $store = $factory->getInstance(CookieStore::class); $this->assertInstanceOf(CookieStore::class, $store); }
<?php use rtens\blog\Admin; use rtens\blog\web\IndexResource; use rtens\domin\delivery\web\WebApplication; use watoki\curir\WebDelivery; require_once __DIR__ . '/vendor/autoload.php'; WebDelivery::quickResponse(IndexResource::class, WebDelivery::init(null, WebApplication::init(function (WebApplication $app) { Admin::initWeb($app, __DIR__ . '/data'); })));
public function before() { $this->request = new WebRequest(Url::fromString('http://example.com/base'), Path::fromString(''), 'get', new Map(), new Liste(['null'])); $this->factory = WebDelivery::init(); }