[*] WS : Allow override of getter from different classes
This commit is contained in:
1 parent
5036cad271
commit
be6987befe
1 file changed
+11
-7
@@ -580,20 +580,24 @@ class WebserviceOutputBuilderCore
|
|||||||
'entities_name' => $ws_params['objectsNodeName'],
|
'entities_name' => $ws_params['objectsNodeName'],
|
||||||
);
|
);
|
||||||
|
|
||||||
if (method_exists($object, $getter) && is_null($this->schemaToDisplay))
|
if (is_array($getter))
|
||||||
{
|
{
|
||||||
$association_resources = $object->$getter();
|
$association_resources = call_user_func($getter, $object);
|
||||||
if (is_array($association_resources) && !empty($association_resources))
|
if (is_array($association_resources) && !empty($association_resources))
|
||||||
{
|
|
||||||
foreach ($association_resources as $association_resource)
|
foreach ($association_resources as $association_resource)
|
||||||
{
|
|
||||||
$objects_assoc[] = $association_resource;
|
$objects_assoc[] = $association_resource;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$objects_assoc[] = '';
|
if (method_exists($object, $getter) && is_null($this->schemaToDisplay))
|
||||||
|
{
|
||||||
|
$association_resources = $object->$getter();
|
||||||
|
if (is_array($association_resources) && !empty($association_resources))
|
||||||
|
foreach ($association_resources as $association_resource)
|
||||||
|
$objects_assoc[] = $association_resource;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$objects_assoc[] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$class_name = null;
|
$class_name = null;
|
||||||
|
|||||||
Reference in new issue
Block a user