note 106844 added to spldoublylinkedlist.getiteratormode

From: Date: Sun, 11 Dec 2011 19:31:03 +0000
Subject: note 106844 added to spldoublylinkedlist.getiteratormode
Groups: php.notes 
Request: Send a blank email to php-notes+get-185049@lists.php.net to get a copy of this message
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; ?> ---- Server IP: 64.71.164.2 Probable Submitter: 108.50.197.183 ---- Manual Page -- http://www.php.net/manual/en/spldoublylinkedlist.getiteratormode.php Edit -- https://master.php.net/note/edit/106844 Del: integrated -- https://master.php.net/note/delete/106844/integrated Del: useless -- https://master.php.net/note/delete/106844/useless Del: bad code -- https://master.php.net/note/delete/106844/bad+code Del: spam -- https://master.php.net/note/delete/106844/spam Del: non-english -- https://master.php.net/note/delete/106844/non-english Del: in docs -- https://master.php.net/note/delete/106844/in+docs Del: other reasons-- https://master.php.net/note/delete/106844 Reject -- https://master.php.net/note/reject/106844 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#185049) next »