\Stack

Represents a variable size last-in-first-out (LIFO) collection of instances of the same specified type.

对集合类型的基本抽象

Summary

Methods
Properties
Constants
__get()
__set()
__construct()
__toString()
GetJson()
offsetSet()
offsetExists()
offsetUnset()
offsetGet()
SaveTo()
ToArray()
No public properties found
No constants found
No protected methods found
$__data
N/A
No private methods found
No private properties found
N/A

Properties

$__data

$__data : array

数组是序列对象的最基本数据存储结构对象

Type

array

Methods

__get()

__get(  $name) 

Parameters

$name

__set()

__set(  $name,   $value) 

Parameters

$name
$value

__construct()

__construct(  $source = NULL) 

使用默认的构造函数

Parameters

$source

__toString()

__toString() 

这个函数定义当前的这个集合对象与字符串函数交互的默认行为

GetJson()

GetJson() 

将当前的这个字典对象序列化为json字符串,以返回给客户端浏览器

offsetSet()

offsetSet(  $offset,   $value) 

Parameters

$offset
$value

offsetExists()

offsetExists(  $offset) 

Parameters

$offset

offsetUnset()

offsetUnset(  $offset) 

Parameters

$offset

offsetGet()

offsetGet(  $offset) 

Parameters

$offset

SaveTo()

SaveTo(string  $path, array  $project = null, string  $encoding = "utf8") : boolean

Save this data collection as csv file

Parameters

string $path

The csv file path for save this collection object.

array $project

The csv file header mapping.

string $encoding

The text file content encoding, by default is utf8 encoding.

Returns

boolean

ToArray()

ToArray() : array

Copies the elements of the ``System.Collections.ArrayList`` to a new System.Object array.

Returns

array —

An System.Object array containing copies of the elements of the System.Collections.ArrayList.