Beispiel #1
0
 /**
  * Handles overload properties (and dynamic singleton class instances).
  *
  * @param string $property Name of a valid overload property.
  *    Or a dynamic class to return an instance of, using the special class `©` prefix.
  *
  * @return mixed Dynamic property values, or a dynamic object instance; else an exception is thrown.
  *    Dynamic class instances are defined explicitly in the docBlock above.
  *    This way IDEs will jive with this dynamic behavior.
  *
  * @throws exception If `$property` CANNOT be defined in any way.
  */
 public function __get($property)
 {
     $property = (string) $property;
     // Typecasting this to a string value.
     if (property_exists($this->wpdb, $property)) {
         return $this->wpdb->{$property};
     }
     return parent::__get($property);
     // Default return value.
 }