Lazy_Collection::__get( string $property )
Allows accessing the collection methods using properties.
Contents
E.g. $collection->first is equivalent to $collection->first().
Parameters
- $property
-
(string) (Required) The name of the property to access.
Return
(mixed|null) The return value of the collection corresponding method or null if the collection does not have that method.
Source
File: src/Tribe/Utils/Lazy_Collection.php
public function __get( $property ) {
if ( method_exists( $this, $property ) ) {
return call_user_func( [ $this, $property ] );
}
return null;
}
Changelog
| Version | Description |
|---|---|
| 4.9.14 | Introduced. |