Beispiel #1
0
 /**
  * This is only for getting the 'length' attribute, to be similar to
  *     JavaScript.
  *
  * @param string $name Key to get value of. Only `length` is accepted.
  *
  * @return mixed The length of the array or null if the key is invalid.
  */
 public function __get($name)
 {
     if ($name == 'length') {
         return static::$helper->length($this->string);
     }
     return null;
 }