library/QATools/QATools/PageObject/Element/AbstractElementCollection.php
protected function assertElement($element)
	{
		if ( !is_a($element, $this->elementClass) ) {
			$message = 'Collection element must be of "%s" class, but element of "%s" class given';

			throw new ElementCollectionException(
				sprintf($message, $this->elementClass, get_class($element)),
				ElementCollectionException::TYPE_ELEMENT_CLASS_MISMATCH
			);
		}

		return $this->acceptElement($element);
	}
protected function assertElement($element)
	{
		if ( !is_a($element, $this->elementClass) ) {
			$message = 'Collection element must be of "%s" class, but element of "%s" class given';

			throw new ElementCollectionException(
				sprintf($message, $this->elementClass, get_class($element)),
				ElementCollectionException::TYPE_ELEMENT_CLASS_MISMATCH
			);
		}

		return $this->acceptElement($element);
	}
protected function assertElement ( $ element ) { if ( ! is_a ( $ element , $ this -> elementClass ) ) { $ message = 'Collection element must be of "%s" class, but element of "%s" class given' ; throw new ElementCollectionException ( sprintf ( $ message , $ this -> elementClass , get_class ( $ element ) ) , ElementCollectionException :: TYPE_ELEMENT_CLASS_MISMATCH ) ; } return $ this -> acceptElement ( $ element ) ; }
Checks that element's class is allowed in collection.

@param mixed $element Element.

@return boolean
@throws ElementCollectionException When class of given element doesn't match one, that collection accepts.
Checks that element s class is allowed in collection .