Jump to content

Recommended Posts

Posted

Hi there,

I'm trying to do the following:

$array = new WireArray();
$array->set('test',123);

but I always get an error:

Error Exception: Item 'test' set to WireArray is not an allowed type

What am I doing wrong?

Thanks a lot!

  • Like 1
Posted

That's correct. Just to reiterate what WIllyC was trying to communicate -- WireArray is an Array meant to store Wire objects. If you need to store something else, then regular PHP array is your best bet.

  • Like 1
Posted

Thank you guys, for your fast replies.

What I'm trying to do is the following:

I'm getting some data from an external webservice and I'm trying to "convert" it to a WireArray (maybe something else), to have the ability to search in this data, without storing the data/items as pages.

What I want to have, is the ability to search in the data of the webservice as described in the "Arrays" section of the API documentation.

  • 6 years later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...