From abd4940ea913e9dddc8d143d00fe1003c7bc9b6b Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 19 Apr 2016 16:08:36 +0200 Subject: * asset manager that derives default asset url from asset base path --- app/php/components/AssetManager.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 app/php/components/AssetManager.php (limited to 'app/php/components/AssetManager.php') diff --git a/app/php/components/AssetManager.php b/app/php/components/AssetManager.php new file mode 100644 index 0000000..1094917 --- /dev/null +++ b/app/php/components/AssetManager.php @@ -0,0 +1,29 @@ +BaseUrl === NULL) { + $appWebPath = preg_replace( + '#' . $this->Application->Request->ApplicationUrl . '$#', + '', + $this->Application->Request->ApplicationFilePath + ); + $appBaseUrl = preg_replace( + '#^' . $appWebPath . '#', + '', + dirname($this->Application->Request->ApplicationFilePath) + ); + $this->BaseUrl = $appBaseUrl + . preg_replace( + '#^' . Prado::getPathOfNamespace('Web') . '#', + '', + $this->BasePath + ); + } + parent::init($config); + } + +} + +?> -- cgit v1.2.3