PodglÄ…d pliku: / books / includes / ibd.php
<?php
/*****************************************************
* System biblioteczny *
*****************************************************
* Wersja: 1.3 Stable *
* Data: 17.06.2012 (15:07) *
* Autor: Jacek Kowalski (http://jacekk.info) *
* *
* Utwor rozprowadzany na licencji *
* http://creativecommons.org/licenses/by-nc-sa/2.5/ *
*****************************************************/
interface ibd_module {
//static $name;
function szukaj_info($tytul=NULL, $autor=NULL, $wydawnictwo=NULL);
function szukaj_ISBN($ISBN);
function szukaj_ISSN($ISSN);
}
class ibd implements Countable {
static $providers = array(
'ibd_BN',
);
static $timelimit = 25;
function __call($function, $args) {
$stop = time() + self::$timelimit;
$return = array();
foreach(self::$providers as $provider) {
if(time() >= $stop) break;
$name = new $provider;
if(!method_exists($name, $function)) {
continue;
}
$results = call_user_func_array(array($name, $function), $args);
if(!empty($results)) {
$return[$name->name] = $results;
}
}
return $return;
}
function count() {
return count(self::$providers);
}
}
?>
Browse Code © 2010 by Jacek Kowalski