Esempio n. 1
0
 public function getClass()
 {
     if (empty(self::$dones)) {
         require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'AbstractLayer.php';
     }
     AbstractLayer::$pdo = $this;
     $class = 'Layer' . strtoupper($this->type);
     if (isset(self::$dones[$class])) {
         return $class;
     }
     $file = dirname(__FILE__) . DIRECTORY_SEPARATOR . $class . '.php';
     if (!file_exists($file)) {
         self::getException('Layer not implemented : ' . $this->type);
     }
     require_once $file;
     self::$dones[$class] = 1;
     return $class;
 }