PHP Array of Objects Internal Navigation Pattern -


I have an array of objects, and objects in my 'neighbors' (next and previous objects) array) Is there an existing pattern to do?

Perhaps the array should be wrapped in an object (since the object can only be added in the form of an array). It's also fine, I'm just looking for an existing good practice method.

Like normal, you can add the next and previous fields to your object, or if you change it If you do not want to, you can create a cover object that will contain the original and will be for those fields or if the array is enough to store your global index within the array and then it is very easy to get to your neighbors.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -