public function GetPHPStandardType(
        \Peg\Lib\Definitions\Element\VariableType $type
    )
    {
        $standard_type = $this->GetStandardType($type);
        $php_type = "";

        switch($standard_type)
        {
            case StandardType::BOOLEAN:
                $php_type .= "bool";
                break;

            case StandardType::INTEGER:
                $php_type .= "int";
                break;

            case StandardType::REAL:
                $php_type .= "float";
                break;

            case StandardType::CHARACTER:
                $php_type .= "string";
                break;

            case StandardType::VOID:
                $php_type .= "void";
                break;

            case StandardType::OBJECT:
                $php_type .= $type->type;
                break;
            
            case StandardType::CLASS_ENUM:
                $php_type .= $type->type . "| int";
                break;
            
            case StandardType::ENUM:
                $php_type .= "int";
                break;
            
            case StandardType::UNKNOWN:
                $php_type .= "unknown";
                break;
        }
        
        return $php_type;
    }
public function GetPHPStandardType(
        \Peg\Lib\Definitions\Element\VariableType $type
    )
    {
        $standard_type = $this->GetStandardType($type);
        $php_type = "";

        switch($standard_type)
        {
            case StandardType::BOOLEAN:
                $php_type .= "bool";
                break;

            case StandardType::INTEGER:
                $php_type .= "int";
                break;

            case StandardType::REAL:
                $php_type .= "float";
                break;

            case StandardType::CHARACTER:
                $php_type .= "string";
                break;

            case StandardType::VOID:
                $php_type .= "void";
                break;

            case StandardType::OBJECT:
                $php_type .= $type->type;
                break;
            
            case StandardType::CLASS_ENUM:
                $php_type .= $type->type . "| int";
                break;
            
            case StandardType::ENUM:
                $php_type .= "int";
                break;
            
            case StandardType::UNKNOWN:
                $php_type .= "unknown";
                break;
        }
        
        return $php_type;
    }
public function GetPHPStandardType ( \ Peg \ Lib \ Definitions \ Element \ VariableType $ type ) { $ standard_type = $ this -> GetStandardType ( $ type ) ; $ php_type = "" ; switch ( $ standard_type ) { case StandardType :: BOOLEAN : $ php_type .= "bool" ; break ; case StandardType :: INTEGER : $ php_type .= "int" ; break ; case StandardType :: REAL : $ php_type .= "float" ; break ; case StandardType :: CHARACTER : $ php_type .= "string" ; break ; case StandardType :: VOID : $ php_type .= "void" ; break ; case StandardType :: OBJECT : $ php_type .= $ type -> type ; break ; case StandardType :: CLASS_ENUM : $ php_type .= $ type -> type . "| int" ; break ; case StandardType :: ENUM : $ php_type .= "int" ; break ; case StandardType :: UNKNOWN : $ php_type .= "unknown" ; break ; } return $ php_type ; }
Gets the php standard type identifier for a variable type.
@todo Add hook|signal so a plugin can modify the returned type.
@param \Peg\Lib\Definitions\Element\VariableType $type
Gets the php standard type identifier for a variable type .