/**
  * If an undefined property method was requested, getSlideProperty() will be called.
  * @param string $name
  * @param array $arguments
  * @return string
  */
 public function __call($name, $arguments)
 {
     preg_match('/^get([A-Z]{1}[a-zA-Z]+)Property$/', $name, $property);
     if (!$property) {
         parent::__call($name, $arguments);
     }
     return $this->getSlideProperty($arguments[0], lcfirst($property[1]));
 }
Exemple #2
0
 /**
  *
  * @param array $needles
  * @param MultipleElement $haystack
  * @return array|bool
  */
 public static function assertElements(array $needles, MultipleElement $haystack)
 {
     $failures = [];
     foreach ($needles as $key => $item) {
         $element = $haystack->setInstance($key + 1);
         $result = self::assertElementProperties($element, $item);
         if ($result !== true) {
             $failures[] = ['properties' => $item, 'result' => $result];
         }
     }
     if ($failures) {
         return $failures;
     }
     return true;
 }