PHP Class Zephir\Stubs\Generator

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

Protected Properties

Property Type Description
$config Zephir\Config
$files Zephir\CompilerFile[]
$ignoreModifiers array Not php visible style variants

Public Methods

Method Description
__construct ( array $files, Zephir\Config $config )
generate ( string $path ) Generates stubs

Protected Methods

Method Description
buildClass ( ClassDefinition $class, string $indent ) : string Build class
buildConstant ( Zephir\ClassConstant $constant, string $indent ) : string
buildMethod ( ClassMethod $method, boolean $isInterface, string $indent ) : string
buildProperty ( ClassProperty $property, string $indent ) : string Build property
wrapPHPValue ( $parameter ) : string Prepare AST default value to PHP code print

Method Details

__construct() public method

public __construct ( array $files, Zephir\Config $config )
$files array
$config Zephir\Config

buildClass() protected method

Build class
protected buildClass ( ClassDefinition $class, string $indent ) : string
$class Zephir\ClassDefinition
$indent string
return string

buildConstant() protected method

protected buildConstant ( Zephir\ClassConstant $constant, string $indent ) : string
$constant Zephir\ClassConstant
$indent string
return string

buildMethod() protected method

protected buildMethod ( ClassMethod $method, boolean $isInterface, string $indent ) : string
$method Zephir\ClassMethod
$isInterface boolean
$indent string
return string

buildProperty() protected method

Build property
protected buildProperty ( ClassProperty $property, string $indent ) : string
$property Zephir\ClassProperty
$indent string
return string

generate() public method

Generates stubs
public generate ( string $path )
$path string

wrapPHPValue() protected method

Prepare AST default value to PHP code print
protected wrapPHPValue ( $parameter ) : string
$parameter
return string

Property Details

$config protected_oe property

protected Config,Zephir $config
return Zephir\Config

$files protected_oe property

protected CompilerFile[],Zephir $files
return Zephir\CompilerFile[]

$ignoreModifiers protected_oe property

Not php visible style variants
protected array $ignoreModifiers
return array