Pelzini

This is the code documentation for the Pelzini project

class VirtualEnumerationsTransformer

This transformer converts constants that start with the same name into an enumeration of that name.

So if a file has the following constants:
  APP_VERSION
  ITEM_TYPE_APPLE
  ITEM_TYPE_ORANGE

The APPLE and ORANGE constants will become a part of the virtual enumeration ITEM_TYPE.

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2024-04-25
**/
class NewClassName extends VirtualEnumerationsTransformer {
    
    /**
    * Processes constants for a specified file
    **/
    private function processConstants (ParserFile $file) {
        // Method code goes here
    }
    
    /**
    * Creates an enum
    **/
    private function createVirtualEnum ($name) {
        // Method code goes here
    }
    
    /**
    * Returns the number of chars in $a that are the same as the chars in $b
    **/
    private function numSimilarChars ($a, $b) {
        // Method code goes here
    }
    
    public function __construct () {
        // Method code goes here
    }
    
    /**
    * Transforms the data model before outputting.
    * 
    * This transformer converts constants that start with the same name into an enumeration of that name.
    **/
    public function transform (array $parser_model) {
        // Method code goes here
    }
    
}
?>