Load Classes Automatically In OOP PHP with an Autoloader - #70

preview_player
Показать описание
If you are ever working with OOP in PHP you need to know about autoloading your classes. You can do this with or without Composer. In this tutorial, we will not be using Composer. Instead, I will show you a quick way to actively look at a folder for specific classes and autoload them so they can be used throughout your application without having to review or include new files every time you create them.

This solution is built into frameworks like Laravel, but if you ever need to build a simple OOP application, this is the best way to minimize code and time.

We will be using the "spl-autoload-register" PHP function.

00:00 Intro
00:48 Livestream Plug
01:28 The Old Way
05:11 Create and Require Our Autoloader
07:51 Building Example Classes You Can Use
12:01 Create An .htaccess File
13:29 Testing Our Code and Autoloader

`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````

Applications Used

Computer Hardware:

Camera:

Audio:

DISCLAIMERS:

Рекомендации по теме
Комментарии
Автор

Great Videos! You're unique on YT!❤️👍 Could you maybe make a video on how to do a simple but very secure API to access a database? The swagger series is too long for me😅

dieweltentdecker