Page MenuHomePhabricator

D667.diff
No OneTemporary

D667.diff

diff --git a/SpitFire.php b/SpitFire.php
--- a/SpitFire.php
+++ b/SpitFire.php
@@ -191,16 +191,6 @@
return $this->apps->has($namespace);
}
- /**
- *
- * @deprecated since version 0.2
- * @param string $namespace
- * @return App
- */
- public function getApp($namespace) {
- return $this->apps->filter(function ($e) use ($namespace) { return $e->url() === $namespace; })->rewind();
- }
-
public static function baseUrl(){
if (Environment::get('base_url')) { return Environment::get('base_url'); }
if (php_sapi_name() === 'cli') { return '/'; }
diff --git a/core/Context.php b/core/Context.php
--- a/core/Context.php
+++ b/core/Context.php
@@ -100,7 +100,7 @@
$context->response = new Response($context);
$context->middleware = new MiddlewareStack($context);
- $context->app = spitfire()->getApp($context->request->getPath()->getApp());
+ $context->app = spitfire()->apps()->get($context->request->getPath()->getApp());
$context->controller = (new \spitfire\core\app\ControllerLocator($context->app))->getController($context->request->getPath()->getController(), $context);
$context->action = $context->request->getPath()->getAction();
$context->object = $context->request->getPath()->getObject();

File Metadata

Mime Type
text/plain
Expires
Apr 12 2021, 12:07 AM (9 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6083
Default Alt Text
D667.diff (1 KB)

Event Timeline