C# Class Pchp.Library.Streams.StreamContext

Resource type used for associating additional options with stream wrappers.
Stream Contexts are stored in a Resource to save useless deep-copying of the contained constant array.
Inheritance: Pchp.Core.PhpResource
Mostrar archivo Open project: iolevel/peachpie Class Usage Examples

Public Properties

Property Type Description
Default StreamContext

Protected Properties

Property Type Description
_data Pchp.Core.PhpArray
_parameters Pchp.Core.PhpArray

Public Methods

Method Description
GetOption ( string scheme, string option ) : PhpValue

Gets a wrapper-specific option identified by the scheme and the option name.

GetValid ( PhpResource resource ) : StreamContext

Checks the context for validity, throws a warning it is not.

GetValid ( PhpResource resource, bool allowNull ) : StreamContext

Checks the context for validity, throws a warning it is not.

StreamContext ( ) : Pchp.Core

Create an empty StreamContext (allows lazy PhpArray instantiation).

StreamContext ( PhpArray data ) : Pchp.Core

Create a new context resource from an array of wrapper options.

Private Methods

Method Description
StreamContext ( PhpArray data, bool registerInCtx ) : Pchp.Core

Create a new context resource from an array of wrapper options.

Method Details

GetOption() public method

Gets a wrapper-specific option identified by the scheme and the option name.
public GetOption ( string scheme, string option ) : PhpValue
scheme string The target wrapper scheme.
option string The option name.
return Pchp.Core.PhpValue

GetValid() public static method

Checks the context for validity, throws a warning it is not.
In case the context is invalid.
public static GetValid ( PhpResource resource ) : StreamContext
resource Pchp.Core.PhpResource Resource which should contain a StreamContext.
return StreamContext

GetValid() public static method

Checks the context for validity, throws a warning it is not.
In case the context is invalid.
public static GetValid ( PhpResource resource, bool allowNull ) : StreamContext
resource Pchp.Core.PhpResource Resource which should contain a StreamContext.
allowNull bool True to allow NULL context, that will be without any warning converted to Default .
return StreamContext

StreamContext() public method

Create an empty StreamContext (allows lazy PhpArray instantiation).
public StreamContext ( ) : Pchp.Core
return Pchp.Core

StreamContext() public method

Create a new context resource from an array of wrapper options.
public StreamContext ( PhpArray data ) : Pchp.Core
data Pchp.Core.PhpArray A 2-dimensional array of wrapper options
return Pchp.Core

Property Details

Default public_oe static_oe property

Default StreamContext. Cannot be null.
public static StreamContext,Pchp.Library.Streams Default
return StreamContext

_data protected_oe property

protected PhpArray,Pchp.Core _data
return Pchp.Core.PhpArray

_parameters protected_oe property

protected PhpArray,Pchp.Core _parameters
return Pchp.Core.PhpArray