Jump to content

Pagearray in $session


Nico Knoll
 Share

Recommended Posts

It should be fine to put in a regular array (of non-objects), but I don't think a PageArray will work. Whatever you put in $session is best reduced to a native PHP type, so to stuff a PageArray into $session, I would typecast it to a string:

$session->pageArray = (string) $pageArray; 

And to pull it out in the next request, pass that string to $pages->find(), which will turn it back into a PageArray:

$pageArray = $pages->get("id=$session->pageArray"); 
  • Like 2
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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