I have a issue, i have the following interface (http://pastebin.com/c11xbdxh) and i have the following class which implements the interface above (http://pastebin.com/m1zGNfSm).
I am using the following autoload function in order to load the classes dynamically:
function autoloadClass($className)
{
$classParts = explode("\\", $className);
$fileName = SYSTEM_CORE_PATH . DIRECTORY_SEPARATOR . "classes" . DIRECTORY_SEPARATOR . strtolower(str_replace('_', DIRECTORY_SEPARATOR, end($classParts)) . '.class.php');
if (is_readable($fileName)) {
if (SYSTEM_DEBUG) {
include_once($fileName);
} else {
@include_once($fileName);
}
}
}
spl_autoload_register("autoloadClass");
and when i creating a new object class (under the autoloading code) i don't get any error neither any output...
try {
$db = new Core\Infrastructure\MySQL(array('user' => DB_USER, 'pass' => DB_PASS, 'host' => DB_HOST, 'name' => DB_NAME));
} catch (PDOException $pdoE) {
echo $pdoE->getMessage();
} catch (Exception $e) {
echo $e->getMessage();
}
echo "<pre>ddd";
$db->runQuery("SELECT * FROM `users`;");
print_r( $db->fetchData());
Thanks for your kind help :)