-1
How can I implode that Interface
in my classes?
class/layout/Header.php
class Header implements Interface {
private function setHeader()
{
}
public function getHeader()
{
}
}
class/interface/Interface.php
interface Interface {
public function getHeader();
}
class/autoload.php
function getClass($class)
{
$dir = ['interface', 'layout'];
foreach ($dir as $row) :
$files = "class/{$row}/{$class}.php";
if (file_exists($files)) :
require_once $files;
endif;
endforeach;
}
spl_autoload_register("getClass");
index php.
require_once "class/autoLoad.php";
Parse error: syntax error, Unexpected 'Interface' (T_INTERFACE), expecting Identifier (T_STRING) or namespace (T_NAMESPACE) or (T_NS_SEPARATOR) in C: xampp htdocs class layout Header.php on line 5