remove() публичный Метод

Removes an item from the map by its key. If no priority, or false, is specified then priority is irrelevant. If null is used as a parameter for priority, then the priority will be the default priority. If a priority is specified, or the default priority is specified, only key-value pairs in that priority will be affected.
public remove ( $key, $priority = false ) : mixed
Результат mixed the removed value, null if no such key exists.
Пример #1
0
 public function testCanNotRemoveWhenReadOnly()
 {
     $map = new TPriorityMap(array('key' => 'value'), true);
     try {
         $map->remove('key');
     } catch (TInvalidOperationException $e) {
         return;
     }
     self::fail('An expected TInvalidOperationException was not raised');
 }