- FEATURES
- Autoload
- Class Reflection
- Magic Methods
- Exceptions
- Late Static Binding
- Type Hinting
- SPL
- PHPUNIT
- PHAR
- COMPOSER
- Carbon
- Guzzle
- Faker
- Math
- Requests
- DESIGN PATTERNS
- Singleton Pattern
- Observer Pattern
- Strategy Pattern
- Dependency Injection
- Middleware
- Registry
- SYMFONY
- Routes
- Annotations
- Flex
- Controllers
- Doctrine
- Templating
- VERSIONS
- Php7.4
- Php8.0
- SECURITY
- Filter Input
- Remote Code Injection
- Sql Injection
- Session Fixation
- File Uploads
- Cross Site Scripting
- Spoofed Forms
- CSRF
- Session Hijacking
- MODERN PHP
- Composer
-
Autoloader
- Package
- Releases
- Generators
- Dependency Injection
- Middleware
- CUSTOM FRAMEWORK
- App
- Http Foundation
- Front Controller
- Routing
- Render Controller
- Resolver
- SoC
- FRAMEWORKS
- Slim
- Symfony V5
- Laravel V8
- Laminas V3
- Codeigniter V4
Autoloader usage
Directory structure
httpclient/
src/
vendor/
index.php
Composer initialization
composer init
Update composer.json file
"autoload": {
"psr-4": {
"minte9\httpclient\": "vendor/minte9/httpclient/src/"
},
"classmap": [
"src/"
]
}
Generate autoload files (vendor/composer/autoload*)
composer dump-autoload
View changes in files
autoload_classmap.php
return array(
'DssParser' => $baseDir . '/src/DssParser.php',
'RapidapiParser' => $baseDir . '/src/RapidapiParser.php',
);
autoload_psr4.php
return array(
'minte9\httpclient\' => array($vendorDir . '/minte9/httpclient/src'),
);
Replace your autoloader with composer autoloader
// index.php
require_once __DIR__ . '/vendor/autoload.php';
Last update: 531 days ago