Everything about PHP namespaces - OOP in PHP | Part 10
Вставка
- Опубліковано 12 гру 2024
- In the following video, it is shown:
What is PHP namespace
Why they are useful.
What problems they solve.
How to create and use them.
Useful Links
---------------------
Namespaces Cheatsheet:
github.com/the...
Namespaces explained:
developer.hyvo...
Official Documentation:
www.php.net/ma...
Other videos on Object-Oriented PHP
------------------------------------------------------------
Introduction to OOP in PHP - • Introduction to OOP in...
Creating classes in PHP - • Creating classes, prop...
Inheritance in PHP - • Inheritance for beginn...
Interfaces - • Interface in PHP for b...
Traits - • PHP traits in depth wi...
Follow me on social media:
/ thecodeholic
/ thecodeholic
github.com/the...
Great tutorial! Really informative and well delivered. So many of other videos lack information and a delivered very slow, your's a perfect. Right to the point
Thank you
Really nice tutorial , no bullshit straight to the point , we need more youtubers of this kind
Glad i found this after a long search. Really an exceptional video. Now i am following The Codeholic :)
Thank you man.
It means a lot for me
Excellent tutorial about namespaces. Thanks a lot !
Thank you
I learned sometjhing new today.
Glad to read that
Awesome tutorial. Thannks, it really helped a lot
Well explained! thanks
Big thanks!
Big Welcome!
thank you
Tnx, It was so great
Very good thank you!
very good but if high contrast text in tutorial, then excellent
Thanks for this OOP series, very good. After video 9 things aren't clicking for me :(
I will keep rewatching I guess
აპოლო 11
Thanks for your tutorial. Can you tell me Which editor are you using?
Welcome.
I use PHPStorm
how about if the CLASS is under => /class/person
Warning: require_once(class/Person\PersonName.class.php): failed to open stream: No such file or directory in /Users/menjilx/Development/playground/includes/autoloader.php on line 13
You are not using correct path to the file. Use "require_once(__DIR__.'/class/Person/PersonName.php')"
Pay attention to the uppercase P
@@TheCodeholic Thank you so much!
Finally, I figured it out :)
My "auloader.php" file.
------
spl_autoload_register('myAutoLoader');
function myAutoLoader($classname){
include 'classes/' . str_replace('\\', "/", $classname) . '.class.php';
}
So, it's like declaring the name of a database in SQL when we have two tables with the same name but in separate databases?
Good example.
Yes
it's like import on javascript, am i right?
Please, does it matter which comes first, the USE statement or the REQUIRE OR INCLUDE statement?
i'm sure you've got your answer by now, but for people who'll read this in the future, by the tutorials i've seen: INCLUDE > REQUIRE>USE
please someone correct me if needed
@@vooshmoozik6185
Better late than never. Thanks
Remove "The" ... just "Codeholic" :))) Tnx BTW. Much appreciated.
No way...
I think magic functions are not what they teach us they are, i also have questions about the Switch/Case functions. but it is nice to have around just keep this in in mind while developing, dont be a Google.
nvd.nist.gov/vuln/detail/CVE-2018-19595
Peace be upon you
Guys, there's an agent who asked me.
The user or customer has a username and password
The first time the manager activates the user account, the activation is for 24 hours only after 24 hours he can not enter
How do I do that?
Help him, please.