/**
* Recursive function, control if the given Type has the given Property
*
* @param string $type The Type where to check
* @param string $property The Property to check
*
* @return boolean
*
* @since 3.2
*/
public static function isPropertyInType($type, $property)
{
if (!static::isTypeAvailable($type)) {
return false;
}
// Control if the $Property exists, and return 'true'
if (\array_key_exists($property, static::$types[$type]['properties'])) {
return true;
}
// Recursive: Check if the $Property is inherit
$extendedType = static::$types[$type]['extends'];
if (!empty($extendedType)) {
return static::isPropertyInType($extendedType, $property);
}
return false;
}