Exemplo n.º 1
0
 /**
  * Create a source code.
  * 
  * @param String! $text The text representing the source code
  * 
  * @param GeshiLanguage! $language The geshiLanguage in which this source code is written
  * 
  * @param String? $sourceid an optional sourceId that will be used to differentiate this source 
  * from other sources if in the same html page. This will be used as a CSS class name and prefix
  * for CSS id, so it should be short. If nothing is provided an identifier will be automatically
  * generated. This is probably the best.
  */
 public function __construct($text, $geshiLanguage, $sourceid = null)
 {
     $this->plainSourceCode = $text;
     $this->geshiLanguage = $geshiLanguage;
     if (isset($sourceid)) {
         $this->sourceId = $sourceid;
     } else {
         $this->sourceId = SourceCode::getNewSourceId();
     }
 }