/**
  * Gets the source code for the specified class.
  *
  * @param cfhCompile_Class_Interface $class
  * @return String
  * @throws cfhCompile_CodeReader_Exception
  */
 public function getSourceCode(cfhCompile_Class_Interface $class)
 {
     $class = $this->plugin->preGetSourceCode($this, $class);
     $source = $this->read->getSourceCode($class);
     if (!is_string($source) && !is_null($source)) {
         throw new cfhCompile_CodeReader_Exception(get_class($this->read) . '->getSourceCode() ' . 'failed to return NULL or a string.');
     }
     return $this->plugin->postGetSourceCode($this, $class, $source);
 }
 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);
     }
 }