mvc
controller
login.class.php
model
login.class.php
lib
login.class.php
index.php
MVC / контроллер / login.class.php
<?php
namespace controller;
require_once('mvc/model/login.class.php');
class login
{
public function __construct()
{
$login = new \model\login();
}
}
?>
MVC / модель / login.class.php
<?php
namespace model;
require_once('lib/login.class.php');
class login
{
public function __construct()
{
$login = new \lib\login();
}
}
?>
Библиотека / login.class.php
<?php
namespace lib;
class login
{
public function __construct()
{
// core class instance
$login = new \DOMDocument();
}
}
?>
index.php
<?php
require_once('mvc/controller/login.class.php');
$login = new \controller\login();
?>