Information services getExtraInfo() doesn't save arrays?

Information Services: Can getExtraInfo() pass a key/value's value as an array?
so that $t_item->get('ca_objects.myService.hierarchy.myKey', array('returnAsArray' => true)) will work?
I can pass array out of getExtraInfo() but I can not seem to retrieve them via ->get.

Does this currently exist?


  • So the information is there? You just want to be able to fetch it via get()?

  • yes. If i try to fetch via get, it's value is "Array", so in the case of ReturnAsArray { [0]=>Array }

  • Are you using develop or 1.7.8 or 1.7.9?

  • Ok I'll look into it.

  • I tried this with the TGN and AAT (for the latter I configured extra info as none is set by default) and got expected return values when get()'ing as string, array and returnWithStructure. Can you provide specifics about what you did to get the incorrect return value? What service were you using. And did you include "hierarachy" in the get spec? I see that in your example above; what are you expecting that to do? The syntax would be


    table>... Ex. ca_objects.wikipedia.abstract (where the metadata element is "wikipedia" and the extra info to fetch is "abstract").

  • I'm changing a metadata field (for Lexicon) from a list_item to an information service - because the list is giant (16K+ items) and makes database backup cumbersome. I am building my own information service to query They do not currently have an api, so I am parsing the returned web page to retrieve the Lexicon terms and hierarachy. I tried to pass the terms as an array (each hierarchy level an array entry) out of getExtraInfo() to retrieve in reports. I can't get that to work. If I use a straight ->get the returned value is "Array". If I include hierarachy it returns nothing. If I include ReturnAsArray it just returns a single element array with the value "Array". I haven't tried returnWithStructure.

    My current work around is returning the hierachy as a delimited string (;) to retrive with ->get, and then exploding it into an array.

    Is their a special way I should prepare data to be retrieved as a hierarchy that I am missing?

  • The extra_info facility is just key/value. It can't return anything other than strings, which is the problem here I think. We can explore changing it to allow structured values (eg. arrays) if you want. We might also try to formalize the nomenclature service you're developing, as that's definitely something others would want. The Nomemclature folks have been promising an API for a while, but it never seems to happen.

    If you want to coordinate on this contact me on Slack.

Sign In or Register to comment.