Skip to content

Commit

Permalink
base
Browse files Browse the repository at this point in the history
  • Loading branch information
schpill committed Feb 11, 2017
1 parent 347b6a4 commit 83577ee
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
19 changes: 19 additions & 0 deletions lib/base.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
namespace Octo;

class Base
{
public function __call($m, $a)
{
if (function_exists('\\Octo\\' . $m)) {
return call_user_func_array('\\Octo\\' . $m, $a);
}
}

public static function __callStatic($m, $a)
{
if (function_exists('\\Octo\\' . $m)) {
return call_user_func_array('\\Octo\\' . $m, $a);
}
}
}
5 changes: 3 additions & 2 deletions lib/controllerbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

class ControllerBase extends FrontController
{
protected $title = '';
protected $models = [];
protected $app = null;
protected $title = '';
protected $models = [];

public function init()
{
Expand Down
2 changes: 2 additions & 0 deletions lib/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
include_once __DIR__ . "/../vendor/autoload.php";
}

require_once __DIR__ . '/base.php';

/* constantes */
defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'production');
defined('SITE_NAME') || define('SITE_NAME', 'Octo');
Expand Down

0 comments on commit 83577ee

Please sign in to comment.