public static function fromReflection(ReflectionConstant $reflectionConstant)
    {
        $cc = new static($reflectionConstant->getName(), $reflectionConstant->getValue());

        if ($reflectionConstant->getReflectionDocComment()->isEmpty() !== true) {
            $cc->setDocumentation(DocCommentGenerator::fromReflection($reflectionConstant->getReflectionDocComment()));
        }

        return $cc;
    }
public static function fromReflection(ReflectionConstant $reflectionConstant)
    {
        $cc = new static($reflectionConstant->getName(), $reflectionConstant->getValue());

        if ($reflectionConstant->getReflectionDocComment()->isEmpty() !== true) {
            $cc->setDocumentation(DocCommentGenerator::fromReflection($reflectionConstant->getReflectionDocComment()));
        }

        return $cc;
    }
public static function fromReflection ( ReflectionConstant $ reflectionConstant ) { $ cc = new static ( $ reflectionConstant -> getName ( ) , $ reflectionConstant -> getValue ( ) ) ; if ( $ reflectionConstant -> getReflectionDocComment ( ) -> isEmpty ( ) !== true ) { $ cc -> setDocumentation ( DocCommentGenerator :: fromReflection ( $ reflectionConstant -> getReflectionDocComment ( ) ) ) ; } return $ cc ; }
Create a new class constant generator from reflection.

@param \Wingu\OctopusCore\Reflection\ReflectionConstant $reflectionConstant The reflection of a class constant.
@return \Wingu\OctopusCore\CodeGenerator\PHP\OOP\ClassConstantGenerator
Create a new class constant generator from reflection .