PHP Класс Zephir\ClassMethod

Represents a class method
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$optimizable

Защищенные свойства (Protected)

Свойство Тип Описание
$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
public getNumberOfRequiredParameters ( ) : integer
Результат integer

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