/** * Constructs a StackAsLinkedList. */ public function __construct() { parent::__construct(); $this->list = new LinkedList(); }
/** * Constructs a StackAsArray with the given size. * * @param integer $size The size of this stack. */ public function __construct($size = 0) { parent::__construct(); $this->array = new BasicArray($size); }