Source for file REPClasses.class.php
Documentation is available at REPClasses.class.php
* @author Takács Ákos (Rimelek), programmer [at] rimelek [dot] hu
* @copyright Copyright (C) 2010, Takács Ákos
* A lapozóhoz tartozó osztályok telepítését, és
* lekérdezését végző osztály.
* @author Takács Ákos (Rimelek), programmer [at] rimelek [dot] hu
* @copyright Copyright (C) 2010, Takács Ákos
* Ennek az osztálynak pontos útvonala
private static $PATH = __FILE__
;
* A telepített osztályok útvonalai.
private static $classes =
array();
* Ha már lefutott egyszer a {@link runInstall()} metódus, akkor true.
private static $installed =
false;
* A telepített osztályok nevei.
* Index a kisbetűs formátum.
private static $lower =
array();
* Ennek az osztálynak a könyvtárneve.
public static function dir()
* Egy osztály telepítése a lapozóba.
* @param string $class {@link import()}-ban használható név
* @param string $path Az telepítendő osztály útvonala ennek az osztálynak
* az könyvtárszintjétől számítva.
public static function install($class,$path)
$lower =
strtolower($class);
if (isset
(self::$lower[$lower]))
throw
new Exception("Osztálynév ütközés");
$classpath =
self::dir().
ltrim($path,'/');
throw
new Exception("Nincs ilyen osztály. ($class: $classpath) Nem telepíthető");
self::$classes[$class] =
$path;
self::$lower[$lower] =
$class;
* Egy osztály importálása.
* @param string $class Importálandó osztály telepített neve.
public static function import($class)
$lower =
strtolower($class);
if (!isset
(self::$lower[$lower]))
throw
new Exception("Nincs ilyen osztály. ($class) Nem importálható");
require_once self::dir().
self::$classes[self::$lower[$lower]];
* Az install.php -ben levő osztályok telepítésének elindítása
if (self::$installed) return;
require_once REPClasses::dir().
'/../install.php';
* A telepített osztályok nevei és útvonalai.
* Telepítés indítása az osztály importálásakor
REPClasses::runInstall();
Documentation generated on Sat, 06 Mar 2010 22:00:16 +0100 by phpDocumentor 1.4.1