03.
Class Methods
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
Whoops, an error! Please, try again later.
7 Comments
I really like how you explain things, this is great
You're welcome!
Hi,
courses 1 to 3 of OOP seem have "Drupal 8" track in the breadcrumb (below SFCast logo) ;)
Hey Steven!
Yea, that's a quirk with our track system - this course belongs in 2 tracks (OO & Drupal) and there's a bit of a shortcoming in our system where we can't currently mark a track as a "primary" track. Something we need to fix one of these days :).
Cheers!
Hi !
I noticed that since the beginning of the course the name of the ship is sometimes Tie fighter and the other time Jedi starship.
Code and comments don't seem to speak the same thing. It's a little confusing.
Hey Marc R.
We use different names to make it clear that we're talking about different objects but yes, it's still a bit confusing. We're sorry about that
Hey @disqus_jfv7blioph ,
You're right, quick catch! Actually, there's a good example :) As you can see, do output inside a method is not a good idea, because it's not obvious. That's why better to return a value inside, and then echo it in the place where the method was called. Or probably, use a good method naming, something like printName() instead of getName(), it'll make more sense. But anyway, returning the value is a better option ;)
Cheers!
"Houston: no signs of life"
Start the conversation!