C# Class Pchp.Core.PhpString

Inheritance: IPhpConvertible, IPhpArray
Exibir arquivo Open project: iolevel/peachpie Class Usage Examples

Public Properties

Property Type Description
Empty PhpString

Private Properties

Property Type Description
AddChunk void
AddChunkToArray void
AssertChunkObject void
ChunkLength int
ChunkLength int
ChunkToBoolean bool
ChunkToBytes byte[]
ChunkToBytes byte[]
ChunkToString string
ChunkToString string
GetCharInChunk char
GetLength int
IPhpArray IPhpArray
IPhpArray PhpAlias
IPhpArray PhpValue
IPhpArray object
IPhpArray void
IPhpArray void
IPhpArray void
IPhpArray void
Output void
OutputChunk void
OutputChunks void
SetCharInChunk void

Public Methods

Method Description
Append ( PhpString value ) : void
Append ( byte value ) : void
Append ( string value ) : void
PhpString ( ) : Pchp.Core.Utilities
PhpString ( byte value ) : Pchp.Core.Utilities
PhpString ( string value ) : Pchp.Core.Utilities
PhpString ( string x, string y ) : Pchp.Core.Utilities
ToBoolean ( ) : bool
ToBytes ( Encoding encoding ) : byte[]
ToClass ( ) : object
ToDouble ( ) : double
ToLong ( ) : long
ToNumber ( PhpNumber &number ) : Convert.NumberInfo
ToString ( ) : string
ToString ( Context ctx ) : string
ToString ( Encoding encoding ) : string
ToStringOrThrow ( Context ctx ) : string
this ( int index ) : char

Gets or sets character at given index according to PHP semantics.

Private Methods

Method Description
AddChunk ( object newchunk ) : void
AddChunkToArray ( object chunks, object newchunk ) : void
AssertChunkObject ( object chunk ) : void
ChunkLength ( object chunk ) : int
ChunkLength ( object chunks, int count ) : int
ChunkToBoolean ( object chunk ) : bool
ChunkToBytes ( Encoding encoding, object chunk ) : byte[]
ChunkToBytes ( Encoding encoding, object chunks, int count ) : byte[]
ChunkToString ( Encoding encoding, object chunk ) : string
ChunkToString ( Encoding encoding, object chunks, int count ) : string
GetCharInChunk ( object chunk, int index ) : char
GetLength ( ) : int
IPhpArray ( IntStringKey key ) : IPhpArray

Ensures the item at given index is array.

IPhpArray ( IntStringKey key ) : PhpAlias

Ensures the item at given index is alias.

IPhpArray ( IntStringKey key ) : PhpValue

Gets value at given index. Gets void value in case the key is not found.

IPhpArray ( IntStringKey key ) : object

Ensures the item at given index is class object.

IPhpArray ( IntStringKey key ) : void

Removes a value matching given key. In case the value is not found, the method does nothing.

IPhpArray ( IntStringKey key, PhpAlias alias ) : void

Writes aliased value at given index.

IPhpArray ( IntStringKey key, PhpValue value ) : void

Sets value at specific index. Value must not be an alias.

IPhpArray ( PhpValue value ) : void

Add a value to the end of array. Value can be an alias.

Output ( Context ctx ) : void
OutputChunk ( Context ctx, object chunk ) : void
OutputChunks ( Context ctx, object chunks, int count ) : void
SetCharInChunk ( object &chunk, int index, char ch ) : void

Method Details

Append() public method

public Append ( PhpString value ) : void
value PhpString
return void

Append() public method

public Append ( byte value ) : void
value byte
return void

Append() public method

public Append ( string value ) : void
value string
return void

PhpString() public method

public PhpString ( ) : Pchp.Core.Utilities
return Pchp.Core.Utilities

PhpString() public method

public PhpString ( byte value ) : Pchp.Core.Utilities
value byte
return Pchp.Core.Utilities

PhpString() public method

public PhpString ( string value ) : Pchp.Core.Utilities
value string
return Pchp.Core.Utilities

PhpString() public method

public PhpString ( string x, string y ) : Pchp.Core.Utilities
x string
y string
return Pchp.Core.Utilities

ToBoolean() public method

public ToBoolean ( ) : bool
return bool

ToBytes() public method

public ToBytes ( Encoding encoding ) : byte[]
encoding Encoding
return byte[]

ToClass() public method

public ToClass ( ) : object
return object

ToDouble() public method

public ToDouble ( ) : double
return double

ToLong() public method

public ToLong ( ) : long
return long

ToNumber() public method

public ToNumber ( PhpNumber &number ) : Convert.NumberInfo
number PhpNumber
return Convert.NumberInfo

ToString() public method

public ToString ( ) : string
return string

ToString() public method

public ToString ( Context ctx ) : string
ctx Context
return string

ToString() public method

public ToString ( Encoding encoding ) : string
encoding Encoding
return string

ToStringOrThrow() public method

public ToStringOrThrow ( Context ctx ) : string
ctx Context
return string

this() public method

Gets or sets character at given index according to PHP semantics.
public this ( int index ) : char
index int Character index.
return char

Property Details

Empty public_oe static_oe property

Empty immutable string.
public static PhpString,Pchp.Core Empty
return PhpString