C# 클래스 Pchp.Core.PhpArray

Implements ordered keyed array of PhpValue with PHP semantics.
상속: PhpHashtable, IPhpConvertible, IPhpArray, IPhpComparable, IPhpEnumerable
파일 보기 프로젝트 열기: iolevel/peachpie 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_intrinsicEnumerator OrderedDictionary.Enumerator

공개 메소드들

메소드 설명
AddValue ( PhpValue value ) : void
Compare ( PhpValue obj ) : int
DeepCopy ( ) : PhpArray

Creates copy of this instance using shared underlaying hashtable.

EnsureItemAlias ( IntStringKey key ) : PhpAlias
EnsureItemArray ( IntStringKey key ) : IPhpArray
EnsureItemObject ( IntStringKey key ) : object
GetEnumerator ( ) : OrderedDictionary.Enumerator

Gets PHP enumerator for this array.

GetForeachEnumerator ( bool aliasedValues ) : IPhpEnumerator

Creates an enumerator used in foreach statement.

GetForeachEnumerator ( bool aliasedValues, RuntimeTypeHandle caller ) : IPhpEnumerator

Creates an enumerator used in foreach statement.

Used for internal purposes only!

GetItemValue ( IntStringKey key ) : PhpValue
Keyed ( ) : PhpArray

Creates an instance of PhpArray filled by given entries.

If the length of keysValues is odd then its last item is added without a key.

New ( ) : PhpArray

Creates an instance of PhpArray filled by given values.

New ( PhpValue value ) : PhpArray

Creates an instance of PhpArray filled by given values.

PhpArray ( ) : System

Creates a new instance of PhpArray with specified capacities for integer and string keys respectively.

PhpArray ( Array values ) : System

Creates a new instance of PhpArray initialized with all values from System.Array.

PhpArray ( Array values, int index, int length ) : System

Creates a new instance of PhpArray initialized with a portion of System.Array.

PhpArray ( IEnumerable data ) : System

Creates a new instance of PhpArray filled by data from an enumerator.

PhpArray ( PhpArray array, bool preserveMaxInt ) : System

Copy constructor. Creates PhpArray that shares internal data table with another PhpArray.

PhpArray ( int capacity ) : System

Creates a new instance of PhpArray with specified capacities for integer and string keys respectively.

PhpArray ( int intCapacity, int stringCapacity ) : System

Creates a new instance of PhpArray with specified capacities for integer and string keys respectively.

RemoveKey ( IntStringKey key ) : void
RestartIntrinsicEnumerator ( ) : void

Restarts intrinsic enumerator - moves it to the first item.

If the intrinsic enumerator has never been used on this instance nothing happens.

SetItemAlias ( IntStringKey key, PhpAlias alias ) : void
SetItemValue ( IntStringKey key, PhpValue value ) : void
ToBoolean ( ) : bool
ToClass ( ) : object
ToDouble ( ) : double
ToLong ( ) : long
ToNumber ( PhpNumber &number ) : Convert.NumberInfo
ToString ( Context ctx ) : string
ToStringOrThrow ( Context ctx ) : string

메소드 상세

AddValue() 공개 메소드

public AddValue ( PhpValue value ) : void
value PhpValue
리턴 void

Compare() 공개 메소드

public Compare ( PhpValue obj ) : int
obj PhpValue
리턴 int

DeepCopy() 공개 메소드

Creates copy of this instance using shared underlaying hashtable.
public DeepCopy ( ) : PhpArray
리턴 PhpArray

EnsureItemAlias() 공개 메소드

public EnsureItemAlias ( IntStringKey key ) : PhpAlias
key IntStringKey
리턴 PhpAlias

EnsureItemArray() 공개 메소드

public EnsureItemArray ( IntStringKey key ) : IPhpArray
key IntStringKey
리턴 IPhpArray

EnsureItemObject() 공개 메소드

public EnsureItemObject ( IntStringKey key ) : object
key IntStringKey
리턴 object

GetEnumerator() 공개 메소드

Gets PHP enumerator for this array.
public GetEnumerator ( ) : OrderedDictionary.Enumerator
리턴 OrderedDictionary.Enumerator

GetForeachEnumerator() 공개 메소드

Creates an enumerator used in foreach statement.
public GetForeachEnumerator ( bool aliasedValues ) : IPhpEnumerator
aliasedValues bool Whether the values returned by enumerator are assigned by reference.
리턴 IPhpEnumerator

GetForeachEnumerator() 공개 메소드

Creates an enumerator used in foreach statement.
Used for internal purposes only!
public GetForeachEnumerator ( bool aliasedValues, RuntimeTypeHandle caller ) : IPhpEnumerator
aliasedValues bool Whether the values returned by enumerator are assigned by reference.
caller System.RuntimeTypeHandle Type of the caller (ignored).
리턴 IPhpEnumerator

GetItemValue() 공개 메소드

public GetItemValue ( IntStringKey key ) : PhpValue
key IntStringKey
리턴 PhpValue

Keyed() 공개 정적인 메소드

Creates an instance of PhpArray filled by given entries.
If the length of keysValues is odd then its last item is added without a key.
public static Keyed ( ) : PhpArray
리턴 PhpArray

New() 공개 정적인 메소드

Creates an instance of PhpArray filled by given values.
public static New ( ) : PhpArray
리턴 PhpArray

New() 공개 정적인 메소드

Creates an instance of PhpArray filled by given values.
public static New ( PhpValue value ) : PhpArray
value PhpValue Value to be added to the new instance. /// Keys will correspond order of values in the array.
리턴 PhpArray

PhpArray() 공개 메소드

Creates a new instance of PhpArray with specified capacities for integer and string keys respectively.
public PhpArray ( ) : System
리턴 System

PhpArray() 공개 메소드

Creates a new instance of PhpArray initialized with all values from System.Array.
public PhpArray ( Array values ) : System
values System.Array
리턴 System

PhpArray() 공개 메소드

Creates a new instance of PhpArray initialized with a portion of System.Array.
public PhpArray ( Array values, int index, int length ) : System
values System.Array
index int
length int
리턴 System

PhpArray() 공개 메소드

Creates a new instance of PhpArray filled by data from an enumerator.
public PhpArray ( IEnumerable data ) : System
data IEnumerable The enumerator containing values added to the new instance.
리턴 System

PhpArray() 공개 메소드

Copy constructor. Creates PhpArray that shares internal data table with another PhpArray.
public PhpArray ( PhpArray array, bool preserveMaxInt ) : System
array PhpArray Table to be shared.
preserveMaxInt bool True to copy the from . /// Otherwise the value will be recomputed when needed. See http://phalanger.codeplex.com/workitem/31484 for more details.
리턴 System

PhpArray() 공개 메소드

Creates a new instance of PhpArray with specified capacities for integer and string keys respectively.
public PhpArray ( int capacity ) : System
capacity int
리턴 System

PhpArray() 공개 메소드

Creates a new instance of PhpArray with specified capacities for integer and string keys respectively.
public PhpArray ( int intCapacity, int stringCapacity ) : System
intCapacity int
stringCapacity int
리턴 System

RemoveKey() 공개 메소드

public RemoveKey ( IntStringKey key ) : void
key IntStringKey
리턴 void

RestartIntrinsicEnumerator() 공개 메소드

Restarts intrinsic enumerator - moves it to the first item.
If the intrinsic enumerator has never been used on this instance nothing happens.
public RestartIntrinsicEnumerator ( ) : void
리턴 void

SetItemAlias() 공개 메소드

public SetItemAlias ( IntStringKey key, PhpAlias alias ) : void
key IntStringKey
alias PhpAlias
리턴 void

SetItemValue() 공개 메소드

public SetItemValue ( IntStringKey key, PhpValue value ) : void
key IntStringKey
value PhpValue
리턴 void

ToBoolean() 공개 메소드

public ToBoolean ( ) : bool
리턴 bool

ToClass() 공개 메소드

public ToClass ( ) : object
리턴 object

ToDouble() 공개 메소드

public ToDouble ( ) : double
리턴 double

ToLong() 공개 메소드

public ToLong ( ) : long
리턴 long

ToNumber() 공개 메소드

public ToNumber ( PhpNumber &number ) : Convert.NumberInfo
number PhpNumber
리턴 Convert.NumberInfo

ToString() 공개 메소드

public ToString ( Context ctx ) : string
ctx Context
리턴 string

ToStringOrThrow() 공개 메소드

public ToStringOrThrow ( Context ctx ) : string
ctx Context
리턴 string

프로퍼티 상세

_intrinsicEnumerator 보호되어 있는 프로퍼티

Intrinsic enumerator associated with the array. Initialized lazily.
protected OrderedDictionary.Enumerator _intrinsicEnumerator
리턴 OrderedDictionary.Enumerator