public static function getPropertyClass($class, $propertyName)
{
if ($class == get_class(new PayPalModel())) {
// Make it generic if PayPalModel is used for generating this
return get_class(new PayPalModel());
}
// If the class doesn't exist, or the method doesn't exist, return null.
if (!class_exists($class) || !method_exists($class, self::getter($class, $propertyName))) {
return null;
}
if (($annotations = self::propertyAnnotations($class, $propertyName)) && isset($annotations['return'])) {
$param = $annotations['return'];
}
if (isset($param)) {
$anno = preg_split("/[\\s\\[\\]]+/", $param);
return $anno[0];
} else {
throw new PayPalConfigurationException("Getter function for '{$propertyName}' in '{$class}' class should have a proper return type.");
}
}