Define
        
        extends AbstractFactory
    
    
            
            in package
            
        
    
    
    
        
            Strategy to convert `define` expressions to ConstantElement
Tags
Table of Contents
- $constantEvaluator : ConstantEvaluator
 - $docBlockFactory : DocBlockFactoryInterface
 - $valueConverter : Standard
 - __construct() : mixed
 - Initializes the object.
 - create() : void
 - Creates an Element out of the given object.
 - matches() : bool
 - Returns true when the strategy is able to handle the object.
 - createDocBlock() : DocBlock|null
 - doCreate() : void
 - Creates an Constant out of the given object.
 - determineFqsen() : Fqsen|null
 - determineValue() : string|null
 - fqsenFromExpression() : Fqsen|null
 - fqsenFromString() : Fqsen
 
Properties
$constantEvaluator
    private
        ConstantEvaluator
    $constantEvaluator
    
        
        
    
$docBlockFactory
    private
        DocBlockFactoryInterface
    $docBlockFactory
    
        
        
    
$valueConverter
    private
        Standard
    $valueConverter
    
        
        
    
Methods
__construct()
Initializes the object.
    public
                __construct(DocBlockFactoryInterface $docBlockFactory, Standard $prettyPrinter[, ConstantEvaluator|null $constantEvaluator = null ]) : mixed
    
        Parameters
- $docBlockFactory : DocBlockFactoryInterface
 - $prettyPrinter : Standard
 - $constantEvaluator : ConstantEvaluator|null = null
 
Return values
mixed —create()
Creates an Element out of the given object.
    public
                create(ContextStack $context, object $object, StrategyContainer $strategies) : void
        Since an object might contain other objects that need to be converted the $stategies are passed so it can be used to create nested Elements. The passed ContextStack contains a stack of upstream created Elements that can be manipulated by factories. This allows the factory to also impact on parent objects of earlier created elements.
Parameters
- $context : ContextStack
 - 
                    
context to set the factory result.
 - $object : object
 - 
                    
object to convert to an Element
 - $strategies : StrategyContainer
 - 
                    
used to convert nested objects.
 
Return values
void —matches()
Returns true when the strategy is able to handle the object.
    public
                matches(ContextStack $context, object $object) : bool
    
        Parameters
- $context : ContextStack
 - $object : object
 - 
                    
object to check.
 
Return values
bool —createDocBlock()
    protected
                createDocBlock([Doc|null $docBlock = null ][, Context|null $context = null ]) : DocBlock|null
        
        Parameters
Return values
DocBlock|null —doCreate()
Creates an Constant out of the given object.
    protected
                doCreate(ContextStack $context, Expression $object, StrategyContainer $strategies) : void
        Since an object might contain other objects that need to be converted the $factory is passed so it can be used to create nested Elements.
Parameters
- $context : ContextStack
 - $object : Expression
 - 
                    
object to convert to an Element
 - $strategies : StrategyContainer
 - 
                    
used to convert nested objects.
 
Return values
void —determineFqsen()
    private
                determineFqsen(Arg $name, ContextStack $context) : Fqsen|null
        
        Parameters
- $name : Arg
 - $context : ContextStack
 
Return values
Fqsen|null —determineValue()
    private
                determineValue(Arg|null $value) : string|null
        
        Parameters
- $value : Arg|null
 
Return values
string|null —fqsenFromExpression()
    private
                fqsenFromExpression(Expr $nameString, ContextStack $context) : Fqsen|null
        
        Parameters
- $nameString : Expr
 - $context : ContextStack
 
Return values
Fqsen|null —fqsenFromString()
    private
                fqsenFromString(string $nameString) : Fqsen
        
        Parameters
- $nameString : string