[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Joomla! Content Management System 5 * 6 * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> 7 * @license GNU General Public License version 2 or later; see LICENSE.txt 8 */ 9 10 namespace Joomla\CMS\Service\Provider; 11 12 use Joomla\CMS\WebAsset\WebAssetRegistry as Registry; 13 use Joomla\DI\Container; 14 use Joomla\DI\ServiceProviderInterface; 15 16 // phpcs:disable PSR1.Files.SideEffects 17 \defined('JPATH_PLATFORM') or die; 18 // phpcs:enable PSR1.Files.SideEffects 19 20 /** 21 * Service provider for the application's WebAsset dependency 22 * 23 * @since 4.0.0 24 */ 25 class WebAssetRegistry implements ServiceProviderInterface 26 { 27 /** 28 * Registers the service provider with a DI container. 29 * 30 * @param Container $container The DI container. 31 * 32 * @return void 33 * 34 * @since 4.0.0 35 */ 36 public function register(Container $container) 37 { 38 $container->alias('webassetregistry', Registry::class) 39 ->share( 40 Registry::class, 41 function (Container $container) { 42 $registry = new Registry(); 43 44 // Add Core registry files 45 $registry 46 ->addRegistryFile('media/vendor/joomla.asset.json') 47 ->addRegistryFile('media/system/joomla.asset.json') 48 ->addRegistryFile('media/legacy/joomla.asset.json'); 49 50 return $registry; 51 }, 52 true 53 ); 54 } 55 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |