PHP Class Zephir\ClassProperty

Represents a property class
ファイルを表示 Open project: phalcon/zephir Class Usage Examples

Protected Properties

Property Type Description
$classDefinition ClassDefinition
$defaultValue
$docblock
$name
$original
$visibility

Public Methods

Method Description
__construct ( ClassDefinition $classDefinition, array $visibility, string $name, mixed $defaultValue, string $docBlock, array $original )
checkVisibility ( array $visibility, string $name, array $original ) Checks for visibility congruence
compile ( zephir\CompilationContext $compilationContext ) Produce the code to register a property
getClassDefinition ( ) : ClassDefinition Returns the class definition where the method was declared
getDocBlock ( ) : string Returns the docblock related to the property
getName ( ) : string Returns the property name
getOriginal ( ) : mixed
getType ( )
getValue ( ) : mixed
getVisibilityAccessor ( ) : string Returns the C-visibility accessors for the model
isPrivate ( ) : boolean Checks whether the variable is private
isProtected ( ) : boolean Checks whether the variable is protected
isPublic ( ) : boolean Checks whether the variable is public
isStatic ( ) : boolean Checks whether the variable is static

Protected Methods

Method Description
declareProperty ( zephir\CompilationContext $compilationContext, string $type, $value ) Declare class property with default value
getBooleanCode ( $value ) : boolean | string
getLetStatement ( )
removeInitializationStatements ( &$statements ) Removes all initialization statements related to this property

Private Methods

Method Description
initializeArray ( $compilationContext )

Method Details

__construct() public method

public __construct ( ClassDefinition $classDefinition, array $visibility, string $name, mixed $defaultValue, string $docBlock, array $original )
$classDefinition ClassDefinition
$visibility array
$name string
$defaultValue mixed
$docBlock string
$original array

checkVisibility() public method

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

compile() public method

Produce the code to register a property
public compile ( zephir\CompilationContext $compilationContext )
$compilationContext zephir\CompilationContext

declareProperty() protected method

Declare class property with default value
protected declareProperty ( zephir\CompilationContext $compilationContext, string $type, $value )
$compilationContext zephir\CompilationContext
$type string
$value

getBooleanCode() protected method

protected getBooleanCode ( $value ) : boolean | string
$value
return boolean | string

getClassDefinition() public method

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

getDocBlock() public method

Returns the docblock related to the property
public getDocBlock ( ) : string
return string

getLetStatement() protected method

protected getLetStatement ( )

getName() public method

Returns the property name
public getName ( ) : string
return string

getOriginal() public method

public getOriginal ( ) : mixed
return mixed

getType() public method

public getType ( )

getValue() public method

public getValue ( ) : mixed
return mixed

getVisibilityAccessor() public method

Returns the C-visibility accessors for the model
public getVisibilityAccessor ( ) : string
return string

isPrivate() public method

Checks whether the variable is private
public isPrivate ( ) : boolean
return boolean

isProtected() public method

Checks whether the variable is protected
public isProtected ( ) : boolean
return boolean

isPublic() public method

Checks whether the variable is public
public isPublic ( ) : boolean
return boolean

isStatic() public method

Checks whether the variable is static
public isStatic ( ) : boolean
return boolean

removeInitializationStatements() protected method

Removes all initialization statements related to this property
protected removeInitializationStatements ( &$statements )

Property Details

$classDefinition protected_oe property

protected ClassDefinition,zephir $classDefinition
return ClassDefinition

$defaultValue protected_oe property

protected $defaultValue

$docblock protected_oe property

protected $docblock

$name protected_oe property

protected $name

$original protected_oe property

protected $original

$visibility protected_oe property

protected $visibility