diff --git a/src/App.php b/src/App.php index 749cbe9cc9..e7381ab125 100644 --- a/src/App.php +++ b/src/App.php @@ -5,11 +5,10 @@ namespace Friendica; use Detection\MobileDetect; -use DOMDocument; -use DOMXPath; use Exception; use Friendica\App\Arguments; use Friendica\App\BaseURL; +use Friendica\App\Page; use Friendica\Core\Config\Cache\ConfigCache; use Friendica\Core\Config\Configuration; use Friendica\Core\Config\PConfiguration; @@ -44,6 +43,9 @@ class App { /** @deprecated 2019.09 - use App\Arguments->getQueryString() */ public $query_string; + /** + * @var Page The current page environment + */ public $page; public $profile; public $profile_uid; @@ -77,9 +79,7 @@ class App public $videoheight = 350; public $force_max_items = 0; public $theme_events_in_profile = true; - - public $stylesheets = []; - public $footerScripts = []; + public $queue; /** * @var App\Mode The Mode of the Application @@ -213,43 +213,23 @@ class App } /** - * Register a stylesheet file path to be included in the tag of every page. - * Inclusion is done in App->initHead(). - * The path can be absolute or relative to the Friendica installation base folder. - * - * @param string $path - * - * @see initHead() - * + * @deprecated 2019.09 - use Page->registerStylesheet instead + * @see Page::registerStylesheet() */ public function registerStylesheet($path) { - if (mb_strpos($path, $this->getBasePath() . DIRECTORY_SEPARATOR) === 0) { - $path = mb_substr($path, mb_strlen($this->getBasePath() . DIRECTORY_SEPARATOR)); - } - - $this->stylesheets[] = trim($path, '/'); + $this->page->registerStylesheet($path); } /** - * Register a javascript file path to be included in the