Assetic\Extension\Twig\TwigResource::__toString PHP Method

__toString() public method

public __toString ( )
    public function __toString()
    {
        return $this->name;
    }

Usage Example

Beispiel #1
0
 public function __toString()
 {
     // Ensure that the name property is cast as a string before returning.
     // This fixes the issue of PHP not bubbling down the __toString()
     // methods.
     // Oh and $name is a private variable so can not be accessed directly.
     // @see https://gist.github.com/lsjroberts/7084126
     return (string) parent::__toString();
 }