library/QATools/QATools/PageObject/PageLocator/DefaultPageLocator.php
protected function getExistingPageClass(array $possible_pages)
	{
		foreach ( $possible_pages as $page_class ) {
			if ( class_exists($page_class) ) {
				return $page_class;
			}
		}

		$message = sprintf(
			'None of the possible classes were found: %s',
			implode($possible_pages, ', ')
		);

		throw new PageFactoryException($message, PageFactoryException::TYPE_PAGE_CLASS_NOT_FOUND);
	}
protected function getExistingPageClass(array $possible_pages)
	{
		foreach ( $possible_pages as $page_class ) {
			if ( class_exists($page_class) ) {
				return $page_class;
			}
		}

		$message = sprintf(
			'None of the possible classes were found: %s',
			implode($possible_pages, ', ')
		);

		throw new PageFactoryException($message, PageFactoryException::TYPE_PAGE_CLASS_NOT_FOUND);
	}
protected function getExistingPageClass ( array $ possible_pages ) { foreach ( $ possible_pages as $ page_class ) { if ( class_exists ( $ page_class ) ) { return $ page_class ; } } $ message = sprintf ( 'None of the possible classes were found: %s' , implode ( $ possible_pages , ', ' ) ) ; throw new PageFactoryException ( $ message , PageFactoryException :: TYPE_PAGE_CLASS_NOT_FOUND ) ; }
Returns first existing class passed in array.

@param array $possible_pages Possible page classes.

@return string
@throws PageFactoryException When page class is not found.
Returns first existing class passed in array .