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
Afficher le fichier Open project: iolevel/peachpie Class Usage Examples

Méthodes publiques

Свойство Type Description
Default StreamContext

Protected Properties

Свойство Type Description
_data Pchp.Core.PhpArray
_parameters Pchp.Core.PhpArray

Méthodes publiques

Méthode 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

Méthode Description
StreamContext ( PhpArray data, bool registerInCtx ) : Pchp.Core

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

Method Details

GetOption() public méthode

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.
Résultat Pchp.Core.PhpValue

GetValid() public static méthode

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.
Résultat StreamContext

GetValid() public static méthode

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 .
Résultat StreamContext

StreamContext() public méthode

Create an empty StreamContext (allows lazy PhpArray instantiation).
public StreamContext ( ) : Pchp.Core
Résultat Pchp.Core

StreamContext() public méthode

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
Résultat Pchp.Core

Property Details

Default public_oe static_oe property

Default StreamContext. Cannot be null.
public static StreamContext,Pchp.Library.Streams Default
Résultat StreamContext

_data protected_oe property

protected PhpArray,Pchp.Core _data
Résultat Pchp.Core.PhpArray

_parameters protected_oe property

protected PhpArray,Pchp.Core _parameters
Résultat Pchp.Core.PhpArray