Skip to content

Commit

Permalink
update file
Browse files Browse the repository at this point in the history
  • Loading branch information
juancristobalgd1 authored Jan 13, 2024
1 parent 79cadfc commit 4297ad6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ private function preInit(): void
{
$this->getContainer();
$this->config = config();
$providersPath = $this->config->paths->providersPath;
$this->container->registerFromDirectory($providersPath);
}

/**
Expand All @@ -63,8 +65,6 @@ private function preInit(): void
*/
private function init(): void
{
$providersPath = $this->config->paths->providersPath;
$this->container->registerFromDirectory($providersPath);
$this->openRoutesUser();
}

Expand Down Expand Up @@ -183,10 +183,10 @@ public function logout(string $path = '/'): void
}

/**
* Get the event handler intent.
* Get the events handler intent.
* @return mixed The event handler intent.
*/
public function event()
public function events()
{
return $this->event;
}
Expand Down
10 changes: 3 additions & 7 deletions src/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,9 @@ public function getAction(): string
* @param string $ext
* @return string|null
*/
public function renderView(
string $view,
?array $params = [],
bool $buffer = true,
string $ext = '.php'
): ?string {
return $this->view::render($view, $params, $buffer, $ext);
public function renderView(string $view, ?array $params = [], string $ext = '.php'): ?string
{
return $this->view::render($view, $params, $ext);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ function raxmScripts()
* @param string $ext The file extension of the View template (default is '.php').
* @return void
*/
function view(string $view, array $params = [], bool $buffer = true, string $ext = '.php')
function view(string $view, array $params = [], string $ext = '.php')
{
// Render the View template using the provided parameters.
$renderedView = Axm::app()->controller->renderView($view, $params, $buffer, $ext);
$renderedView = Axm::app()->controller->renderView($view, $params, $ext);

// Display the rendered View template using the 'show' function.
return show($renderedView);
Expand Down

0 comments on commit 4297ad6

Please sign in to comment.