A PHP tutorial demonstrating how to use interfaces to make your code cleaner, reusable and adhere to certain solid principles. This PHP tutorial is aimed at PHP developers at a beginner level who are learning object orientated programming (OOP)
==== GET EARLY ACCESS TO FUTURE VIDEOS & TUTORIALS ====
Patron:
======== RECOMMENDED PROGRAMMING RESOURCES ========
Manning programming books and courses:
PHP Books:
PHP Hosting from Cloudways:
======== MY PROGRAMMING COURSES ========
Docker in Motion:
Skillshare courses:
Udemy courses:
======== WEB HOSTING DEALS ========
Cloudways: = 20% off first 6 months
Digital Ocean: = $10 off
Linode:
======== SUBSCRIBE TO THE NEWSLETTER ========
Join the Newsletter:
======== FOLLOW ME ========
Blog:
Facebook:
Instagram:
Twitter:
Pintrest:
Twitch:
======== MY TALKS ========
How to put your Docker image on a diet:
======== SUPPORT THE CHANNEL ========
Become a Patron:
Donate:
Help translate the videos:
======== VIDEO SETUP ========
Nikon D5300 Camera:
Logitech HD Pro Webcam C920
CRAPHY Photography Studio Lights:
Rode Procaster Microphone:
Rode VideoMic Pro:
Zoom H4NPro:
Nguồn: https://svdpch.org/
Xem thêm bài viết khác: https://svdpch.org/cong-nghe/
You were confused about this yourself, it's obvious from your hesitant explanation, not very good.
2020 and PHP is not dead and it's more alive than some other technologies! Has anyone heard anything of ruby for a while?!
Very much useful and helpful great video
Excellent example and explanation!
I have tried to understand bits of "oop" whenever I came accross them. Most high level presentations left me with "When would I ever want THAT?".
This particular film took me to the point I was really interested in.
It just remains to say "Thanks for publishing it"
I have watched many of these – but this is the best video about interfaces in PHP.
Excellent tutorial, thank you very much!
Great lesson, thank you for sharing.
Nice and clean . . .
What I captured very well in this tutorial is that interfaces are mainly setting rules for your classes, but from the code you wrote about the payment gateway, don't you think I can decide not to use interface as I will write all the methods that is needed for the different classes and call the methods inside the process method for each of the classes. I will now call the process method for any of the classes in the paymentGateway Class because they already all have process
@Peter Fisher I wonder if is a good idea to use a trait instead of 2 more interfaces to give the extra functionality FraudCheck to the class that need it ? I would appreciate it if you reply me
2:52 the genuine way is always The English way.❤
Thank You Peter Fisher, I do very rarely subscribe to channels. But this video forced me to subscribe to your channel because this explained me in a simple and practical way of using interfaces in the real world environment. Thank you Jesus for leading me to this beautiful tutorial. God bless you. 🙂
I watched much tutorial for interface multi languages .. and i never understand why be should to use interface expect your tutorial I understand now, thank you so much ❤️
You actually helped me a lot in understanding not only interface.. But the true purpose of it which focusses on cohesion and coupling. I knew a good principle of design is to have high cohesion, low coupling.. but still don’t know how to implement it in a system… thank you for your explanation. By doing this way, it will be easier to modify the system in the future. Better lecturer than my university’s lol
oh dear – php is just awfull.
Thank you very much! It helped me understand interfaces.. Great tutorial!
Very useful tutorial! Thanks
Excellent example to explain the principles.
Thanks, brah. I understand interfaces now.
In the case of shapes, couldnt you just use an abstract inheritance with abstract functions instead of interface?
Thanks for the great tutorial. There is a confusion I am having about the object you declared for the payment gateway example. Since you created an object only for mintfee and passed it how will other 2 class methods will be code. I tried to run the code you have given and only the mintfee class methods are called. Can you explain that and clear the doubt?
RUN PHP!!! Awesome Mug!
Why don't you just put the fraud checking method inside pay method?
Stop looking at the keyboard, and u will be making less mistakes after a while.
Peter, Is the code in this tutorial available on github? Searched for it and didn't find anything?
Thanks for your explanation! Only interface tutorial I have understood 😀
you know you use an interface to be able to swap between different classes… wouldnt a drop down menu on the users side do the same? or is this what the interface allows you to do on the users side?
where do these functions go in your code?..do you use 'includes' to call them?
i thought duplication was a bad thing..is there a better way to put the three shapes in the same class or call them with the same attributes somehow? i like the format of code and you on same screen..alot easier to concentrate. thx
I'm just seeing this video and I appreciate your simplified explanation, I just read a source on Dependency Injection and how ir eliminates tight coupling. This looks quite similar to what was implemented in the source I read. Could your example be likened to a somewhat implementation of Dependency Injection.
This is a great explanation. Just one thing. In the first 10 minutes with the shape example, you added ‘shape interface’ as a parameter in the addShape method. What does this do as I believe this would still work with only $shape as the argument?