C# 클래스 PHP.Core.ScriptContext

상속: ILogicalThreadAffinative
파일 보기 프로젝트 열기: jadu/Phalanger 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CreateDefaultScriptContext ScriptContext
DynamicInclude object
IncludeScript object
InitConstants void
InitPlatformSpecific void
InitWebRequest ScriptContext
LoadDynamicScriptType System.ScriptInfo
RunApplication void
SearchForIncludedFile FullPath
StaticInclude bool

공개 메소드들

메소드 설명
Include ( string relativeSourcePath, bool once ) : object

Includes a specific script using current configuration.

InitApplication ( PHP.Core.ApplicationContext appContext, Type mainScript, string relativeSourcePath, string sourceRoot ) : ScriptContext

Initializes the script context for a PHP console application.

Use this method if you want to initialize application in the same way the PHP console/Windows application is initialized. The returned script context is initialized as follows: The application's source root is set. The main script of the application is defined. Output and input streams are set to standard output and input, respectively. Current culture it set to CultureInfo.InvariantCulture. Auto-global variables ($_GET, $_SET, etc.) are initialized. Working directory is set tothe current working directory.

InitContext ( PHP.Core.ApplicationContext appContext ) : ScriptContext

Initializes ScriptContext for the C#/PHP interoperability.

Use this method if you want to initialize application in the same way the PHP console/Windows application is initialized. CurrentContext is set, and initialized to simulate request begin and end.

InitContext ( PHP.Core.ApplicationContext appContext, Stream output ) : ScriptContext

Initializes ScriptContext for the C#/PHP interoperability.

Use this method if you want to initialize application in the same way the PHP console/Windows application is initialized. CurrentContext is set, and initialized to simulate request begin and end.

RegisterSessionGlobals ( ) : void

Adds session variables aliases to global variables.

비공개 메소드들

메소드 설명
CreateDefaultScriptContext ( ) : ScriptContext

Initialize new ScriptContext and store it into the LogicalCallContext.

DynamicInclude ( string includedFilePath, string includerFileRelPath, object>.Dictionary variables, DObject self, DTypeDesc includer, InclusionTypes inclusionType ) : object
IncludeScript ( string relativeSourcePath, System.ScriptInfo script ) : object

Performs PHP inclusion on a specified script.

The inclusion inheres in adding the target to the list of included scripts on the current script context (see ScriptContext.Scripts and in a call to the global code of the target script.

InitConstants ( object>.DualDictionary _constants ) : void
InitPlatformSpecific ( ) : void
InitWebRequest ( PHP.Core.ApplicationContext appContext, HttpContext context ) : ScriptContext

Initializes the script context for a web request.

LoadDynamicScriptType ( PHP.Core.PhpSourceFile sourceFile ) : System.ScriptInfo

Loads a script type dynamically.

RunApplication ( Delegate mainRoutine, string relativeSourcePath, string sourceRoot ) : void
SearchForIncludedFile ( PhpError errorSeverity, string includedPath, FullPath includerFullPath ) : FullPath

Searches for a file in the script library, current directory, included paths, and web application root respectively.

StaticInclude ( int level, string relativeSourcePath, RuntimeTypeHandle includee, InclusionTypes inclusionType ) : bool

메소드 상세

Include() 공개 메소드

Includes a specific script using current configuration.
public Include ( string relativeSourcePath, bool once ) : object
relativeSourcePath string Source root relative path to the script.
once bool Specifies whether script should be included only once.
리턴 object

InitApplication() 공개 정적인 메소드

Initializes the script context for a PHP console application.
Use this method if you want to initialize application in the same way the PHP console/Windows application is initialized. The returned script context is initialized as follows: The application's source root is set. The main script of the application is defined. Output and input streams are set to standard output and input, respectively. Current culture it set to CultureInfo.InvariantCulture. Auto-global variables ($_GET, $_SET, etc.) are initialized. Working directory is set tothe current working directory.
/// Web configuration is invalid. The context is not initialized then. ///
public static InitApplication ( PHP.Core.ApplicationContext appContext, Type mainScript, string relativeSourcePath, string sourceRoot ) : ScriptContext
appContext PHP.Core.ApplicationContext Application context.
mainScript System.Type The main script's type or a null reference for a pure application.
relativeSourcePath string A path to the main script source file.
sourceRoot string A source root within which an application has been compiler.
리턴 ScriptContext

InitContext() 공개 정적인 메소드

Initializes ScriptContext for the C#/PHP interoperability.
Use this method if you want to initialize application in the same way the PHP console/Windows application is initialized. CurrentContext is set, and initialized to simulate request begin and end.
public static InitContext ( PHP.Core.ApplicationContext appContext ) : ScriptContext
appContext PHP.Core.ApplicationContext Application context.
리턴 ScriptContext

InitContext() 공개 정적인 메소드

Initializes ScriptContext for the C#/PHP interoperability.
Use this method if you want to initialize application in the same way the PHP console/Windows application is initialized. CurrentContext is set, and initialized to simulate request begin and end.
public static InitContext ( PHP.Core.ApplicationContext appContext, Stream output ) : ScriptContext
appContext PHP.Core.ApplicationContext Application context.
output Stream Output stream.
리턴 ScriptContext

RegisterSessionGlobals() 공개 메소드

Adds session variables aliases to global variables.
public RegisterSessionGlobals ( ) : void
리턴 void