在线文档教程
PHP
SPL

SplStack (class)

The SplStack class

Introduction

(PHP 5 >= 5.3.0, PHP 7)

The SplStack class provides the main functionalities of a stack implemented using a doubly linked list.

Class synopsis

SplStack extends SplDoublyLinkedList implements Iterator , ArrayAccess , Countable {

/* Methods */

__construct ( void )

void setIteratorMode ( int $mode )

/* Inherited methods */

public void SplDoublyLinkedList::add ( mixed $index , mixed $newval )

public mixed SplDoublyLinkedList::bottom ( void )

public int SplDoublyLinkedList::count ( void )

public mixed SplDoublyLinkedList::current ( void )

public int SplDoublyLinkedList::getIteratorMode ( void )

public bool SplDoublyLinkedList::isEmpty ( void )

public mixed SplDoublyLinkedList::key ( void )

public void SplDoublyLinkedList::next ( void )

public bool SplDoublyLinkedList::offsetExists ( mixed $index )

public mixed SplDoublyLinkedList::offsetGet ( mixed $index )

public void SplDoublyLinkedList::offsetSet ( mixed $index , mixed $newval )

public void SplDoublyLinkedList::offsetUnset ( mixed $index )

public mixed SplDoublyLinkedList::pop ( void )

public void SplDoublyLinkedList::prev ( void )

public void SplDoublyLinkedList::push ( mixed $value )

public void SplDoublyLinkedList::rewind ( void )

public string SplDoublyLinkedList::serialize ( void )

public void SplDoublyLinkedList::setIteratorMode ( int $mode )

public mixed SplDoublyLinkedList::shift ( void )

public mixed SplDoublyLinkedList::top ( void )

public void SplDoublyLinkedList::unserialize ( string $serialized )

public void SplDoublyLinkedList::unshift ( mixed $value )

public bool SplDoublyLinkedList::valid ( void )

}

Table of Contents

  • SplStack::__construct — Constructs a new stack implemented using a doubly linked list

  • SplStack::setIteratorMode — Sets the mode of iteration

← SplDoublyLinkedList::valid

SplStack::__construct →

© 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

https://secure.php.net/manual/en/class.splstack.php