public static function convertResource2Array(ICompanyServiceResource $resource) { $res = array(); $res['id'] = $resource->getIdentifier(); $res['name'] = $resource->getName(); $res['order'] = $resource->getOrder(); $res['link'] = $resource->getUri(); return $res; }