0

I'm following Aleana's videos through OOP, I understand the concepts of the keyword $this, self etc but when she refers to $this->property_name->method_name(); I get confused.

Is this saying we are passing the property to the method? My description is where she returns $this->current()->details

Example code below:

public function shortDescription()
{
    if(strlen($this->current()->details) < 510){
        return strip_tags($this->current()->details);
    }
}

Any help on helping me understand it will be greatly appreciated.

Developer Jay
  • 953
  • 1
  • 10
  • 15

0 Answers0