note 106844 deleted from spldoublylinkedlist.getiteratormode by danbrown

From: Date: Tue, 03 Jan 2012 22:17:33 +0000
Subject: note 106844 deleted from spldoublylinkedlist.getiteratormode by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-185347@lists.php.net to get a copy of this message
Note Submitter: gregorypatmore at gmail dot com ---- Sorry All, forgot to include the way you SHOULD do it (at least until they add any more options). Basically, you should just check the non-zero flags (LIFO(2) and DELETE(1)). Since it's an either/or situation within the pairs, this should be able to help you figure out the separate mode pieces an instance has been set to. example: <?php $l = new SPLDoublyLinkedList(); $l->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO | SplDoublyLinkedList::IT_MODE_DELETE); $mode = $l->getIteratorMode(); $isLIFO = ($mode & SplDoublyLinkedList::IT_MODE_LIFO) == SplDoublyLinkedList::IT_MODE_LIFO; $isDELETE = ($mode & SplDoublyLinkedList::IT_MODE_DELETE) == SplDoublyLinkedList::IT_MODE_DELETE; ?>

« previous php.notes (#185347) next »