init
This commit is contained in:
116
app/Config/Autoload.php
Normal file
116
app/Config/Autoload.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
namespace Config;
|
||||
|
||||
use CodeIgniter\Config\AutoloadConfig;
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------
|
||||
* AUTOLOADER CONFIGURATION
|
||||
* -------------------------------------------------------------------
|
||||
*
|
||||
* This file defines the namespaces and class maps so the Autoloader
|
||||
* can find the files as needed.
|
||||
*
|
||||
* NOTE: If you use an identical key in $psr4 or $classmap, then
|
||||
* the values in this file will overwrite the framework's values.
|
||||
*
|
||||
* NOTE: This class is required prior to Autoloader instantiation,
|
||||
* and does not extend BaseConfig.
|
||||
*
|
||||
* @immutable
|
||||
*/
|
||||
class Autoload extends AutoloadConfig
|
||||
{
|
||||
/**
|
||||
* -------------------------------------------------------------------
|
||||
* Namespaces
|
||||
* -------------------------------------------------------------------
|
||||
* This maps the locations of any namespaces in your application to
|
||||
* their location on the file system. These are used by the autoloader
|
||||
* to locate files the first time they have been instantiated.
|
||||
*
|
||||
* The '/app' and '/system' directories are already mapped for you.
|
||||
* you may change the name of the 'App' namespace if you wish,
|
||||
* but this should be done prior to creating any namespaced classes,
|
||||
* else you will need to modify all of those classes for this to work.
|
||||
*
|
||||
* Prototype:
|
||||
* $psr4 = [
|
||||
* 'CodeIgniter' => SYSTEMPATH,
|
||||
* 'App' => APPPATH
|
||||
* ];
|
||||
*
|
||||
* @var array<string, array<int, string>|string>
|
||||
* @phpstan-var array<string, string|list<string>>
|
||||
*/
|
||||
public $psr4 = [
|
||||
APP_NAMESPACE => APPPATH, // For custom app namespace
|
||||
'Config' => APPPATH . 'Config',
|
||||
'Dhiva/Core' => APPPATH . 'Libraries',
|
||||
];
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------
|
||||
* Class Map
|
||||
* -------------------------------------------------------------------
|
||||
* The class map provides a map of class names and their exact
|
||||
* location on the drive. Classes loaded in this manner will have
|
||||
* slightly faster performance because they will not have to be
|
||||
* searched for within one or more directories as they would if they
|
||||
* were being autoloaded through a namespace.
|
||||
*
|
||||
* Prototype:
|
||||
* $classmap = [
|
||||
* 'MyClass' => '/path/to/class/file.php'
|
||||
* ];
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
public $classmap =
|
||||
[
|
||||
'Dhiva\Core\DhivaRoutes' => APPPATH . 'Libraries/DhivaRoutes.php',
|
||||
'Dhiva\Core\DhivaAES' => APPPATH . 'Libraries/DhivaAES.php',
|
||||
'Dhiva\Core\Notification' => APPPATH . 'Libraries/Notification.php',
|
||||
'ArelAyudhi\DhivaProdevWa\ProdevMessages' => APPPATH . 'Libraries/ArelAyudhi/src/ProdevMessages.php',
|
||||
'ArelAyudhi\DhivaProdevWa\ProdevMessagesAbstract' => APPPATH . 'Libraries/ArelAyudhi/src/ProdevMessagesAbstract.php',
|
||||
'ArelAyudhi\DhivaProdevWa\Multiple' => APPPATH . 'Libraries/ArelAyudhi/src/Multiple.php',
|
||||
'ArelAyudhi\DhivaProdevWa\Group' => APPPATH . 'Libraries/ArelAyudhi/src/Group.php',
|
||||
'ArelAyudhi\DhivaProdevWa\ListMessage' => APPPATH . 'Libraries/ArelAyudhi/src/ListMessage.php',
|
||||
'ArelAyudhi\DhivaProdevWa\Broadcast' => APPPATH . 'Libraries/ArelAyudhi/src/Broadcast.php',
|
||||
'ArelAyudhi\DhivaProdevWa\UserList' => APPPATH . 'Libraries/ArelAyudhi/src/UserList.php',
|
||||
'Dhiva\Core\Notification' => APPPATH . 'Libraries/Notification.php'
|
||||
];
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------
|
||||
* Files
|
||||
* -------------------------------------------------------------------
|
||||
* The files array provides a list of paths to __non-class__ files
|
||||
* that will be autoloaded. This can be useful for bootstrap operations
|
||||
* or for loading functions.
|
||||
*
|
||||
* Prototype:
|
||||
* $files = [
|
||||
* '/path/to/my/file.php',
|
||||
* ];
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var list<string>
|
||||
*/
|
||||
public $files = [];
|
||||
|
||||
/**
|
||||
* -------------------------------------------------------------------
|
||||
* Helpers
|
||||
* -------------------------------------------------------------------
|
||||
* Prototype:
|
||||
* $helpers = [
|
||||
* 'form',
|
||||
* ];
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var list<string>
|
||||
*/
|
||||
public $helpers = ['device'];
|
||||
}
|
||||
Reference in New Issue
Block a user