예제 #1
0
 protected function write(cfhCompile_Class_Interface $class)
 {
     if (isset($this->classesWritten[$class->getName()])) {
         return;
     }
     $this->classesWritten[$class->getName()] = TRUE;
     $source = $this->codeReader->getSourceCode($class);
     if ($source !== NULL) {
         $this->notify(cfhCompile_Compiler_Event::EVENT_WRITE, $class);
         $this->codeWriter->write($class, $source, $this->classRegistry);
     } else {
         $this->notify(cfhCompile_Compiler_Event::EVENT_SKIP, $class);
     }
 }
예제 #2
0
 /**
  * Write a class.
  *
  * @param cfhCompile_Class_Interface $class
  * @param String $sourceCode
  * @param cfhCompile_ClassRegistry $classRegistry
  */
 public function write(cfhCompile_Class_Interface $class, $sourceCode, cfhCompile_ClassRegistry $classRegistry)
 {
     $sourceCode = $this->plugin->preWrite($this, $class, $sourceCode, $classRegistry);
     $this->write->write($class, $sourceCode, $classRegistry);
     $this->plugin->postWrite($this, $class, $sourceCode, $classRegistry);
 }