PHP 클래스 Zephir\ClassMethod

Represents a class method
파일 보기 프로젝트 열기: phalcon/zephir 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$optimizable

보호된 프로퍼티들

프로퍼티 타입 설명
$callGathererPass Zephir\Passes\CallGathererPass Call Gatherer Pass
$classDefinition ClassDefinition
$docblock string
$expression array | null
$isAbstract boolean Whether the method is abstract or not
$isBundled boolean Whether the method is bundled with PHP or not
$isFinal boolean Whether the method is final or not
$isInitializer boolean Whether the method is an initializer or not
$isInternal boolean Whether the method is internal or not
$isPublic boolean Whether the method is public or not
$isStatic boolean Whether the method is static or not
$localContext Zephir\Passes\LocalContextPass LocalContextPass
$name string
$parameters ClassMethodParameters
$parsedDocblock Zephir\Documentation\Docblock
$returnClassTypes Class type hints returned by the method
$returnTypes array Types returned by the method
$returnTypesRaw array Raw-types returned by the method
$statements
$typeInference Zephir\Passes\StaticTypeInference Static Type Inference Pass
$visibility array
$void boolean Whether the variable is void

공개 메소드들

메소드 설명
__construct ( ClassDefinition $classDefinition, array $visibility, $name, $parameters, zephir\StatementsBlock $statements = null, null $docblock = null, null $returnType = null, array $original = null ) ClassMethod constructor
areReturnTypesBoolCompatible ( string $type = null ) : boolean Checks whether at least one return type hint is integer compatible
areReturnTypesDoubleCompatible ( string $type = null ) : boolean Checks whether at least one return type hint is double compatible
areReturnTypesIntCompatible ( string $type = null ) : boolean Checks whether at least one return type hint is integer compatible
areReturnTypesNullCompatible ( string $type = null ) : boolean Checks whether at least one return type hint is null compatible
areReturnTypesStringCompatible ( string $type = null ) : boolean Checks whether at least one return type hint is integer compatible
assignDefaultValue ( array $parameter, zephir\CompilationContext $compilationContext ) : string Assigns a default value
assignZvalValue ( array $parameter, zephir\CompilationContext $compilationContext ) : string Assigns a zval value to a static low-level type
checkStrictType ( array $parameter, zephir\CompilationContext $compilationContext ) : string Assigns a zval value to a static low-level type
checkVisibility ( array $visibility, string $name, array $original = null ) Checks for visibility congruence
compile ( zephir\CompilationContext $compilationContext ) : null Compiles the method
getCallGathererPass ( ) : Zephir\Passes\CallGathererPass Returns the call gatherer pass information
getClassDefinition ( ) : ClassDefinition Returns the class definition where the method was declared
getDocBlock ( ) : string Returns the raw docblock
getInternalName ( ) : string
getInternalParameters ( ) : string Returns the number of required parameters the method has
getLastLine ( ) : mixed the ending line of the method in the source file
getLine ( ) : mixed the starting line of the method in the source file
getLocalContextPass ( ) : LocalContextPass Returns the local context pass information
getModifiers ( ) : string Returns the C-modifier flags
getName ( ) : string Returns the method name
getNumberOfParameters ( ) : integer Returns the number of parameters the method has
getNumberOfRequiredParameters ( ) : integer Returns the number of required parameters the method has
getOptimizedMethod ( )
getParameters ( ) : ClassMethodParameters Returns the parameters
getParsedDocBlock ( ) : Docblock Returns the parsed docblock
getReturnClassTypes ( ) : array Returned class-type hints by the method
getReturnTypes ( ) : array Returned type hints by the method
getReturnTypesRaw ( ) : array
getShortcutName ( ) : mixed Return shortcut method name
getStatementsBlock ( ) : zephir\StatementsBlock Getter for statements block
getStaticTypeInferencePass ( ) : Zephir\Passes\StaticTypeInference Returns the static type inference pass information
getVisibility ( ) : array Returns method visibility modifiers
hasChildReturnStatementType ( array $statement ) : boolean Simple method to check if one of the paths are returning the right expected type
hasModifier ( string $modifier ) : boolean Checks whether the method has a specific modifier
hasParameters ( ) : boolean Returns the number of parameters the method has
hasReturnTypes ( ) : boolean Checks if the method has return-type or cast hints
hasReturnTypesRaw ( )
isAbstract ( ) : boolean Checks is abstract method?
isBundled ( ) : boolean Checks whether the method is bundled
isConstructor ( ) : boolean Check whether the current method is a constructor
isDeprecated ( )
isEmpty ( ) : boolean Checks whether the method is empty
isFinal ( ) : boolean Checks whether the method is final
isInitializer ( ) : boolean Checks whether the method is an initializer
isInline ( ) : boolean Checks if the method is inline
isInternal ( ) : boolean Checks whether the method is internal
isPrivate ( ) : boolean Checks if the method is private
isProtected ( ) : boolean Checks if the method is protected
isPublic ( ) : boolean Checks if the method is public
isShortcut ( ) : boolean Checks if method is a shortcut
isStatic ( ) : boolean Checks whether the method is static
isVoid ( ) : boolean Checks if the method must not return any value
preCompile ( zephir\CompilationContext $compilationContext ) : null Pre-compiles the method making compilation pass data (static inference, local-context-pass) available to other methods
removeMemoryStackReferences ( SymbolTable $symbolTable, string $containerCode ) : mixed Replace macros
setIsBundled ( boolean $bundled ) Sets if the method is bundled or not
setIsInitializer ( boolean $initializer ) Sets if the method is an initializer or not
setIsInternal ( boolean $internal ) Sets if the method is internal or not
setIsStatic ( boolean $static ) Sets if the method is internal or not
setName ( string $name ) Sets the method name
setReturnTypes ( $returnType )
setStatementsBlock ( zephir\StatementsBlock $statementsBlock ) Setter for statements block
setupOptimized ( zephir\CompilationContext $compilationContext ) Generate internal method's based on the equivalent PHP methods, allowing bypassing php userspace for internal method calls

메소드 상세

__construct() 공개 메소드

ClassMethod constructor
public __construct ( ClassDefinition $classDefinition, array $visibility, $name, $parameters, zephir\StatementsBlock $statements = null, null $docblock = null, null $returnType = null, array $original = null )
$classDefinition ClassDefinition
$visibility array
$name
$parameters
$statements zephir\StatementsBlock
$docblock null
$returnType null
$original array

areReturnTypesBoolCompatible() 공개 메소드

Checks whether at least one return type hint is integer compatible
public areReturnTypesBoolCompatible ( string $type = null ) : boolean
$type string
리턴 boolean

areReturnTypesDoubleCompatible() 공개 메소드

Checks whether at least one return type hint is double compatible
public areReturnTypesDoubleCompatible ( string $type = null ) : boolean
$type string
리턴 boolean

areReturnTypesIntCompatible() 공개 메소드

Checks whether at least one return type hint is integer compatible
public areReturnTypesIntCompatible ( string $type = null ) : boolean
$type string
리턴 boolean

areReturnTypesNullCompatible() 공개 메소드

Checks whether at least one return type hint is null compatible
public areReturnTypesNullCompatible ( string $type = null ) : boolean
$type string
리턴 boolean

areReturnTypesStringCompatible() 공개 메소드

Checks whether at least one return type hint is integer compatible
public areReturnTypesStringCompatible ( string $type = null ) : boolean
$type string
리턴 boolean

assignDefaultValue() 공개 메소드

Assigns a default value
public assignDefaultValue ( array $parameter, zephir\CompilationContext $compilationContext ) : string
$parameter array
$compilationContext zephir\CompilationContext
리턴 string

assignZvalValue() 공개 메소드

Assigns a zval value to a static low-level type
public assignZvalValue ( array $parameter, zephir\CompilationContext $compilationContext ) : string
$parameter array
$compilationContext zephir\CompilationContext
리턴 string

checkStrictType() 공개 메소드

Assigns a zval value to a static low-level type
public checkStrictType ( array $parameter, zephir\CompilationContext $compilationContext ) : string
$parameter array
$compilationContext zephir\CompilationContext
리턴 string

checkVisibility() 공개 메소드

Checks for visibility congruence
public checkVisibility ( array $visibility, string $name, array $original = null )
$visibility array
$name string
$original array

compile() 공개 메소드

Compiles the method
public compile ( zephir\CompilationContext $compilationContext ) : null
$compilationContext zephir\CompilationContext
리턴 null

getCallGathererPass() 공개 메소드

Returns the call gatherer pass information
public getCallGathererPass ( ) : Zephir\Passes\CallGathererPass
리턴 Zephir\Passes\CallGathererPass

getClassDefinition() 공개 메소드

Returns the class definition where the method was declared
public getClassDefinition ( ) : ClassDefinition
리턴 ClassDefinition

getDocBlock() 공개 메소드

Returns the raw docblock
public getDocBlock ( ) : string
리턴 string

getInternalName() 공개 메소드

public getInternalName ( ) : string
리턴 string

getInternalParameters() 공개 메소드

Returns the number of required parameters the method has
public getInternalParameters ( ) : string
리턴 string

getLastLine() 공개 메소드

the ending line of the method in the source file
public getLastLine ( ) : mixed
리턴 mixed

getLine() 공개 메소드

the starting line of the method in the source file
public getLine ( ) : mixed
리턴 mixed

getLocalContextPass() 공개 메소드

Returns the local context pass information
public getLocalContextPass ( ) : LocalContextPass
리턴 Zephir\Passes\LocalContextPass

getModifiers() 공개 메소드

Returns the C-modifier flags
public getModifiers ( ) : string
리턴 string

getName() 공개 메소드

Returns the method name
public getName ( ) : string
리턴 string

getNumberOfParameters() 공개 메소드

Returns the number of parameters the method has
public getNumberOfParameters ( ) : integer
리턴 integer

getNumberOfRequiredParameters() 공개 메소드

Returns the number of required parameters the method has

getOptimizedMethod() 공개 메소드

public getOptimizedMethod ( )

getParameters() 공개 메소드

Returns the parameters
public getParameters ( ) : ClassMethodParameters
리턴 ClassMethodParameters

getParsedDocBlock() 공개 메소드

Returns the parsed docblock
public getParsedDocBlock ( ) : Docblock
리턴 Zephir\Documentation\Docblock

getReturnClassTypes() 공개 메소드

Returned class-type hints by the method
public getReturnClassTypes ( ) : array
리턴 array

getReturnTypes() 공개 메소드

Returned type hints by the method
public getReturnTypes ( ) : array
리턴 array

getReturnTypesRaw() 공개 메소드

public getReturnTypesRaw ( ) : array
리턴 array

getShortcutName() 공개 메소드

Return shortcut method name
public getShortcutName ( ) : mixed
리턴 mixed

getStatementsBlock() 공개 메소드

Getter for statements block
public getStatementsBlock ( ) : zephir\StatementsBlock
리턴 zephir\StatementsBlock $statements Statements block

getStaticTypeInferencePass() 공개 메소드

Returns the static type inference pass information
public getStaticTypeInferencePass ( ) : Zephir\Passes\StaticTypeInference
리턴 Zephir\Passes\StaticTypeInference

getVisibility() 공개 메소드

Returns method visibility modifiers
public getVisibility ( ) : array
리턴 array

hasChildReturnStatementType() 공개 메소드

Simple method to check if one of the paths are returning the right expected type
public hasChildReturnStatementType ( array $statement ) : boolean
$statement array
리턴 boolean

hasModifier() 공개 메소드

Checks whether the method has a specific modifier
public hasModifier ( string $modifier ) : boolean
$modifier string
리턴 boolean

hasParameters() 공개 메소드

Returns the number of parameters the method has
public hasParameters ( ) : boolean
리턴 boolean

hasReturnTypes() 공개 메소드

Checks if the method has return-type or cast hints
public hasReturnTypes ( ) : boolean
리턴 boolean

hasReturnTypesRaw() 공개 메소드

public hasReturnTypesRaw ( )

isAbstract() 공개 메소드

Checks is abstract method?
public isAbstract ( ) : boolean
리턴 boolean

isBundled() 공개 메소드

Checks whether the method is bundled
public isBundled ( ) : boolean
리턴 boolean

isConstructor() 공개 메소드

Check whether the current method is a constructor
public isConstructor ( ) : boolean
리턴 boolean

isDeprecated() 공개 메소드

public isDeprecated ( )

isEmpty() 공개 메소드

Checks whether the method is empty
public isEmpty ( ) : boolean
리턴 boolean

isFinal() 공개 메소드

Checks whether the method is final
public isFinal ( ) : boolean
리턴 boolean

isInitializer() 공개 메소드

Checks whether the method is an initializer
public isInitializer ( ) : boolean
리턴 boolean

isInline() 공개 메소드

Checks if the method is inline
public isInline ( ) : boolean
리턴 boolean

isInternal() 공개 메소드

Checks whether the method is internal
public isInternal ( ) : boolean
리턴 boolean

isPrivate() 공개 메소드

Checks if the method is private
public isPrivate ( ) : boolean
리턴 boolean

isProtected() 공개 메소드

Checks if the method is protected
public isProtected ( ) : boolean
리턴 boolean

isPublic() 공개 메소드

Checks if the method is public
public isPublic ( ) : boolean
리턴 boolean

isShortcut() 공개 메소드

Checks if method is a shortcut
public isShortcut ( ) : boolean
리턴 boolean

isStatic() 공개 메소드

Checks whether the method is static
public isStatic ( ) : boolean
리턴 boolean

isVoid() 공개 메소드

Checks if the method must not return any value
public isVoid ( ) : boolean
리턴 boolean

preCompile() 공개 메소드

Pre-compiles the method making compilation pass data (static inference, local-context-pass) available to other methods
public preCompile ( zephir\CompilationContext $compilationContext ) : null
$compilationContext zephir\CompilationContext
리턴 null

removeMemoryStackReferences() 공개 메소드

Replace macros
public removeMemoryStackReferences ( SymbolTable $symbolTable, string $containerCode ) : mixed
$symbolTable SymbolTable
$containerCode string
리턴 mixed

setIsBundled() 공개 메소드

Sets if the method is bundled or not
public setIsBundled ( boolean $bundled )
$bundled boolean

setIsInitializer() 공개 메소드

Sets if the method is an initializer or not
public setIsInitializer ( boolean $initializer )
$initializer boolean

setIsInternal() 공개 메소드

Sets if the method is internal or not
public setIsInternal ( boolean $internal )
$internal boolean

setIsStatic() 공개 메소드

Sets if the method is internal or not
public setIsStatic ( boolean $static )
$static boolean

setName() 공개 메소드

Sets the method name
public setName ( string $name )
$name string

setReturnTypes() 공개 메소드

public setReturnTypes ( $returnType )

setStatementsBlock() 공개 메소드

Setter for statements block
public setStatementsBlock ( zephir\StatementsBlock $statementsBlock )
$statementsBlock zephir\StatementsBlock

setupOptimized() 공개 메소드

Generate internal method's based on the equivalent PHP methods, allowing bypassing php userspace for internal method calls
public setupOptimized ( zephir\CompilationContext $compilationContext )
$compilationContext zephir\CompilationContext

프로퍼티 상세

$callGathererPass 보호되어 있는 프로퍼티

Call Gatherer Pass
protected CallGathererPass,Zephir\Passes $callGathererPass
리턴 Zephir\Passes\CallGathererPass

$classDefinition 보호되어 있는 프로퍼티

protected ClassDefinition,zephir $classDefinition
리턴 ClassDefinition

$docblock 보호되어 있는 프로퍼티

protected string $docblock
리턴 string

$expression 보호되어 있는 프로퍼티

protected array|null $expression
리턴 array | null

$isAbstract 보호되어 있는 프로퍼티

Whether the method is abstract or not
protected bool $isAbstract
리턴 boolean

$isBundled 보호되어 있는 프로퍼티

Whether the method is bundled with PHP or not
protected bool $isBundled
리턴 boolean

$isFinal 보호되어 있는 프로퍼티

Whether the method is final or not
protected bool $isFinal
리턴 boolean

$isInitializer 보호되어 있는 프로퍼티

Whether the method is an initializer or not
protected bool $isInitializer
리턴 boolean

$isInternal 보호되어 있는 프로퍼티

Whether the method is internal or not
protected bool $isInternal
리턴 boolean

$isPublic 보호되어 있는 프로퍼티

Whether the method is public or not
protected bool $isPublic
리턴 boolean

$isStatic 보호되어 있는 프로퍼티

Whether the method is static or not
protected bool $isStatic
리턴 boolean

$localContext 보호되어 있는 프로퍼티

LocalContextPass
protected LocalContextPass,Zephir\Passes $localContext
리턴 Zephir\Passes\LocalContextPass

$name 보호되어 있는 프로퍼티

protected string $name
리턴 string

$optimizable 공개적으로 프로퍼티

public $optimizable

$parameters 보호되어 있는 프로퍼티

protected ClassMethodParameters,zephir $parameters
리턴 ClassMethodParameters

$parsedDocblock 보호되어 있는 프로퍼티

protected Docblock,Zephir\Documentation $parsedDocblock
리턴 Zephir\Documentation\Docblock

$returnClassTypes 보호되어 있는 프로퍼티

Class type hints returned by the method
protected $returnClassTypes

$returnTypes 보호되어 있는 프로퍼티

Types returned by the method
protected array $returnTypes
리턴 array

$returnTypesRaw 보호되어 있는 프로퍼티

Raw-types returned by the method
protected array $returnTypesRaw
리턴 array

$statements 보호되어 있는 프로퍼티

protected $statements

$typeInference 보호되어 있는 프로퍼티

Static Type Inference Pass
protected StaticTypeInference,Zephir\Passes $typeInference
리턴 Zephir\Passes\StaticTypeInference

$visibility 보호되어 있는 프로퍼티

protected array $visibility
리턴 array

$void 보호되어 있는 프로퍼티

Whether the variable is void
protected bool $void
리턴 boolean