[ 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) 2014 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\Autoload; 11 12 use Composer\Autoload\ClassLoader as ComposerClassLoader; 13 14 // phpcs:disable PSR1.Files.SideEffects 15 \defined('_JEXEC') or die; 16 // phpcs:enable PSR1.Files.SideEffects 17 18 /** 19 * Decorate Composer ClassLoader for Joomla! 20 * 21 * For backward compatibility due to class aliasing in the CMS, the loadClass() method was modified to call 22 * the JLoader::applyAliasFor() method. 23 * 24 * @since 3.4 25 */ 26 class ClassLoader 27 { 28 /** 29 * The Composer class loader 30 * 31 * @var ComposerClassLoader 32 * @since 3.4 33 */ 34 private $loader; 35 36 /** 37 * Constructor 38 * 39 * @param ComposerClassLoader $loader Composer autoloader 40 * 41 * @since 3.4 42 */ 43 public function __construct(ComposerClassLoader $loader) 44 { 45 $this->loader = $loader; 46 } 47 48 /** 49 * Loads the given class or interface. 50 * 51 * @param string $class The name of the class 52 * 53 * @return boolean|null True if loaded, null otherwise 54 * 55 * @since 3.4 56 */ 57 public function loadClass($class) 58 { 59 if ($result = $this->loader->loadClass($class)) { 60 \JLoader::applyAliasFor($class); 61 } 62 63 return $result; 64 } 65 }
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 |