correction
This commit is contained in:
parent
f9f148cf65
commit
cb9118d24f
2
.idea/modules.xml
generated
2
.idea/modules.xml
generated
@ -2,7 +2,7 @@
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/portfolio.iml" filepath="$PROJECT_DIR$/.idea/portfolio.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/app.iml" filepath="$PROJECT_DIR$/.idea/app.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
4
.idea/php.xml
generated
4
.idea/php.xml
generated
@ -10,7 +10,9 @@
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="8.4" />
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="7.0">
|
||||
<option name="suggestChangeDefaultLanguageLevel" value="false" />
|
||||
</component>
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
|
@ -4,7 +4,9 @@ spl_autoload_register(function ($className) {
|
||||
// Définir les mappings des namespaces vers leurs répertoires de base
|
||||
$namespaceMap = [
|
||||
'Portfolio\\Configure\\Routing\\' => __DIR__ . '/../routing/',
|
||||
'Portfolio\\Source\\Design\\Controller\\Home' => __DIR__ . '/../../source/design/controller/home/',
|
||||
|
||||
'Portfolio\\Source\\Design\\Controller\\Home\\' => __DIR__ . '/../../source/design/controller/home/',
|
||||
'Portfolio\\Source\\Design\\Controller\\Home\\Read\\' => __DIR__ . '/../../source/design/controller/home/read',
|
||||
];
|
||||
|
||||
// Parcourir les namespaces définis pour trouver une correspondance
|
||||
|
@ -1,8 +1,11 @@
|
||||
<?php
|
||||
|
||||
use Portfolio\Configure\Routing\Router;
|
||||
|
||||
// Inclusion de l'autoloader
|
||||
require_once __DIR__ . '/../configure/autoloader/autoload.php';
|
||||
|
||||
$router = new \Portfolio\Configure\Routing\Router(['url']);
|
||||
$router = new Router($_GET['url']);
|
||||
|
||||
$router->get('/', 'Portfolio\Source\Design\Controller\Home\Index@index');
|
||||
$router->get('/home/:id', 'Portfolio\Source\Design\Controller\Home\Read\Read@read');
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace portfolio\source\design\home;
|
||||
namespace Portfolio\source\design\controller\home;
|
||||
|
||||
class Index
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
|
||||
public function index() {
|
||||
// return $this->show('index.php');
|
||||
echo "index";
|
||||
echo 'function index';
|
||||
// return $this->show('home.index');
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace portfolio\source\design\home\read;
|
||||
namespace Portfolio\Source\Design\Controller\Home\Read;
|
||||
|
||||
class Read
|
||||
{
|
||||
public function read(int $id)
|
||||
{
|
||||
echo 'post' . $id;
|
||||
|
||||
public function read(int $id) {
|
||||
echo "post" . $id;
|
||||
// return $this->show('home.read', compact(['id']));
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user