public function getConstants()
    {
        if ($this->constants === null) {
            $prettyPrinter = new PrettyPrinter\Standard;
            // lazy load class constants list
            $this->constants = array();
            foreach ($this->node->stmts as $stmt) {
                if ($stmt instanceof Node\Stmt\ClassConst) {
                    foreach ($stmt->consts as $const) {
                        $this->constants[$const->name] = trim(
                            $prettyPrinter->prettyPrintExpr($const->value),
                            '"\''
                        );
                    }
                }
            }
        }
        return $this->constants;
    }
public function getConstants()
    {
        if ($this->constants === null) {
            $prettyPrinter = new PrettyPrinter\Standard;
            // lazy load class constants list
            $this->constants = array();
            foreach ($this->node->stmts as $stmt) {
                if ($stmt instanceof Node\Stmt\ClassConst) {
                    foreach ($stmt->consts as $const) {
                        $this->constants[$const->name] = trim(
                            $prettyPrinter->prettyPrintExpr($const->value),
                            '"\''
                        );
                    }
                }
            }
        }
        return $this->constants;
    }
public function getConstants ( ) { if ( $ this -> constants === null ) { $ prettyPrinter = new PrettyPrinter \ Standard ; // lazy load class constants list $ this -> constants = array ( ) ; foreach ( $ this -> node -> stmts as $ stmt ) { if ( $ stmt instanceof Node \ Stmt \ ClassConst ) { foreach ( $ stmt -> consts as $ const ) { $ this -> constants [ $ const -> name ] = trim ( $ prettyPrinter -> prettyPrintExpr ( $ const -> value ) , '"\'' ) ; } } } } return $ this -> constants ; }
Gets the constants.

@return array An array of constants. Constant name in key, constant value in value.
Gets the constants .