Nico Knoll Posted October 8, 2012 Share Posted October 8, 2012 Hey, is it possible to save the whole pagearray for a page in $session? Or at least a whole regular array? Greets, Nico Link to comment Share on other sites More sharing options...
diogo Posted October 8, 2012 Share Posted October 8, 2012 Why do you need that? can't you keep only the necessary info to build the array? Link to comment Share on other sites More sharing options...
ryan Posted October 8, 2012 Share Posted October 8, 2012 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"); 2 Link to comment Share on other sites More sharing options...
Nico Knoll Posted October 9, 2012 Author Share Posted October 9, 2012 I'm just looking for a better way for my preview solution Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now