Object Oriented PHP #4 - Constructors

preview_player
Показать описание
Hey gang, in this object oriented PHP tutorial we'll talk about constructors in classes (the __construct( ) method). We can use constructors to set up custom property values for every class instance that we create.
----------------------------------------

🐱‍💻 🐱‍💻 Course Links:

🐱‍💻 🐱‍💻 Other Related Courses:

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

By far this is the best php oop videos i've came across.

MaximBordyug.
Автор

BRO I AM IN YEAR 2023 AND WATCHED LIKE 3 FULL COURSE OF VIDEOS HERE IN YOUTUBE AND I'M STILL CONFUSE BUT AS I'VE SEEN THIS FULL COURSE I COULD SAY YOU NAILED IT! THANK YOU FOR YOUR EXISTENCE :D

francodeguzman
Автор

Just watched the basic tutorial and now the object oriented one and im so grateful, your way of teaching is awesome ty for ur hard work!! :3

xvictorx
Автор

short, crystal clear, heres my like bro.

Og
Автор

Perfect explanation!

Thank you Shaun

ademineshat
Автор

Best tutorials on YT by far, thank you Shaun. 👍

LittleRhubarb
Автор

i have completed this course successfully.

netplusvirtua
Автор

Shaun A laravl Series will be awesome, I'll be very thankful if you do the laravel 6 series

awaisraza
Автор

Good job Shaun just waiting for the next videos about OOP, and please release the next videos sooner.

Arman-cntf
Автор

thanks, really helpful.
Also, I want to be able to say refresh in the same way =).

ore_bear
Автор

Since php 8 you can use constructor property promotion to make it a bit cleaner:

public function __construct(
public string $username,
public string $email,
) {
$this->name = $username;
$this->email = $email;
}

martijnkoch
Автор

Oh cool, Ninja is doing oop. I wonder how far he is going to go with it. My design patterns knowledge sucks, and it would be nice to get better at it.

leonf.
Автор

Hi!!! I agree, this is a great one. By the way any of you know why I am getting this error?
Exception #0 (BadMethodCallException): Missing required argument $userName of Test\Company\Model\User.

tajazc
Автор

what php extension are you using in vs code?

cfmvalizan
Автор

You need to tell me what keyboard you're using, sounds silent af. I need one.

MuffinologyTrainer
Автор

Sir please a series about semantic UI and it's

mohtsimelahi
Автор

why are u prounouncig "R" letter so weird? like ? is it some speech pathology?
anyway thank you!

ranenyysoldzha