Skip to content

Commit

Permalink
Capitalisation Standardisation
Browse files Browse the repository at this point in the history
Moving to lowercase.
  • Loading branch information
BeardyMike committed Feb 20, 2024
1 parent d7ca5f1 commit 37f32d1
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 41 deletions.
6 changes: 3 additions & 3 deletions application/Controller/AjaxController.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php
/*
* Class AjaxController
* Class ajaxController
*
* Please note:
* Don't use the same name for class and method, as this might trigger an (unintended) __construct of the class.
* This is really weird behaviour, but documented here: http://php.net/manual/en/language.oop5.decon.php
*
*/

namespace MINIM1\Controller;
namespace MINIM1\controller;

class AjaxController
class ajaxController
{
/*
* PAGE: create
Expand Down
6 changes: 3 additions & 3 deletions application/Controller/AuthController.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php
/*
* Class AuthController
* Class authController
*
* Please note:
* Don't use the same name for class and method, as this might trigger an (unintended) __construct of the class.
* This is really weird behaviour, but documented here: http://php.net/manual/en/language.oop5.decon.php
*
*/

namespace MINIM1\Controller;
namespace MINIM1\controller;

class AuthController
class authController
{
/*
* PAGE: create
Expand Down
8 changes: 4 additions & 4 deletions application/Controller/ErrorController.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?php

/**
* Class Error
* Class error
*
* Please note:
* Don't use the same name for class and method, as this might trigger an (unintended) __construct of the class.
* This is really weird behaviour, but documented here: http://php.net/manual/en/language.oop5.decon.php
*
*/

namespace MINIM1\Controller;
namespace MINIM1\controller;

/**
* Models
* This is where you pull the models that are required for this controller
*/
use MINIM1\model\Read;
use MINIM1\model\read;

class ErrorController
class errorController
{
/**
* PAGE: index
Expand Down
4 changes: 2 additions & 2 deletions application/Controller/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*
*/

namespace MINIM1\Controller;
namespace MINIM1\controller;

class HomeController
class homeController
{
/**
* PAGE: index
Expand Down
4 changes: 2 additions & 2 deletions application/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*
*/

namespace MINIM1\Controller;
namespace MINIM1\controller;

class LoginController
class loginController
{
/**
* PAGE: index
Expand Down
14 changes: 7 additions & 7 deletions application/Core/Application.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/** For more info about namespaces plase @see http://php.net/manual/en/language.namespaces.importing.php */
namespace MINIM1\Core;
namespace MINIM1\core;

require APP . 'Core/CoreFunctions.php';
require APP . 'core/corefunctions.php';

class Application
class application
{
/** @var null The controller */
private $url_controller = null;
Expand All @@ -27,16 +27,16 @@ public function __construct()
// check for controller: no controller given ? then load start-page
if (!$this->url_controller) {

$page = new \MINIM1\Controller\HomeController();
$page = new \MINIM1\controller\homeController();
$page->index();

}
elseif (file_exists(APP . 'Controller/' . ucfirst($this->url_controller) . 'Controller.php')) {
elseif (file_exists(APP . 'controller/' . $this->url_controller . 'Controller.php')) {
// here we did check for controller: does such a controller exist ?
// if so, then load this file and create this controller
// like \MINIM1\Controller\CarController
$controller = "\\MINIM1\\Controller\\" . ucfirst($this->url_controller) . 'Controller';
// like \MINIM1\controller\carController
$controller = "\\MINIM1\\controller\\" . $this->url_controller . 'Controller';
$this->url_controller = new $controller();

// check for method: does such a method exist in the controller ?
Expand Down
2 changes: 1 addition & 1 deletion application/Core/CoreFunctions.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace MINIM1\Controller;
namespace MINIM1\controller;

function view($path, $data = [])
{
Expand Down
4 changes: 2 additions & 2 deletions application/Core/Model.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace MINIM1\Core;
namespace MINIM1\core;

use PDO;

class Model
class model
{
/**
* @var null Database Connection
Expand Down
7 changes: 4 additions & 3 deletions application/Model/Auth.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

namespace MINIM1\Model;
use MINIM1\Core\Model;
namespace MINIM1\model;

class Auth extends Model
use MINIM1\core\model;

class auth extends model
{
public function validate_user($username, $password)
{
Expand Down
6 changes: 3 additions & 3 deletions application/Model/Create.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace MINIM1\Model;
namespace MINIM1\model;

use MINIM1\Core\Model;
use MINIM1\core\model;

class Create extends Model
class create extends model
{

}
6 changes: 3 additions & 3 deletions application/Model/Delete.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace MINIM1\Model;
namespace MINIM1\model;

use MINIM1\Core\Model;
use MINIM1\core\model;

class Delete extends Model
class delete extends model
{

}
6 changes: 3 additions & 3 deletions application/Model/Read.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace MINIM1\Model;
namespace MINIM1\model;

use MINIM1\Core\Model;
use MINIM1\core\model;

class Read extends Model
class read extends model
{

}
6 changes: 3 additions & 3 deletions application/Model/Update.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace MINIM1\Model;
namespace MINIM1\model;

use MINIM1\Core\Model;
use MINIM1\core\model;

class Update extends Model
class update extends model
{

}
4 changes: 2 additions & 2 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
require APP . 'config/config.php';

// load application class
use MINIM1\Core\Application;
use MINIM1\core\application;

// start the application
$app = new Application();
$app = new application();

0 comments on commit 37f32d1

Please sign in to comment.