Implemented a PSR-4 compliant scheme.
FuzeWorks can now be properly loaded by Composer, without any lost functionality.
This commit is contained in:
parent
c4b2291556
commit
320edec16b
|
@ -1,203 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* FuzeWorks.
|
||||
*
|
||||
* The FuzeWorks MVC PHP FrameWork
|
||||
*
|
||||
* Copyright (C) 2015 TechFuze
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author TechFuze
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
* @copyright Copyright (c) 1996 - 2015, Free Software Foundation, Inc. (http://www.fsf.org/)
|
||||
* @license http://opensource.org/licenses/GPL-3.0 GPLv3 License
|
||||
*
|
||||
* @link http://fuzeworks.techfuze.net
|
||||
* @since Version 0.0.1
|
||||
*
|
||||
* @version Version 0.0.1
|
||||
*/
|
||||
|
||||
namespace FuzeWorks;
|
||||
|
||||
/**
|
||||
* Class Exception.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class Exception extends \Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class LayoutException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class LayoutException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class ConfigException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class ConfigException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class ModelException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class ModelException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class LoggerException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class LoggerException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class RouterException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class RouterException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class CoreException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class CoreException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class EventException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class EventException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class DatabaseException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class DatabaseException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class ModuleException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class ModuleException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class LibraryException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class LibraryException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class HelperException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class HelperException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class LanguageException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class LanguageException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class UriException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class UriException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class SecurityException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class SecurityException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class FactoryException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class FactoryException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Class InvalidArgumentException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class InvalidArgumentException extends Exception
|
||||
{
|
||||
}
|
|
@ -31,6 +31,8 @@
|
|||
"latte/latte": "*"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": ["Core/System/"]
|
||||
"psr-4": {
|
||||
"FuzeWorks\\": "src/FuzeWorks/"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -32,9 +32,9 @@
|
|||
|
||||
use FuzeWorks\Logger;
|
||||
use FuzeWorks\Config;
|
||||
use FuzeWorks\ConfigException;
|
||||
use FuzeWorks\Exception\ConfigException;
|
||||
use FuzeWorks\Database;
|
||||
use FuzeWorks\DatabaseException;
|
||||
use FuzeWorks\Exception\DatabaseException;
|
||||
use FuzeWorks\Core;
|
||||
|
||||
/**
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
use FuzeWorks\Factory;
|
||||
use FuzeWorks\Logger;
|
||||
use FuzeWorks\DatabaseException;
|
||||
use FuzeWorks\Exception\DatabaseException;
|
||||
use FuzeWorks\Utf8;
|
||||
use FuzeWorks\Language;
|
||||
use FuzeWorks\Core;
|
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
use FuzeWorks\Logger;
|
||||
use FuzeWorks\DatabaseException;
|
||||
use FuzeWorks\Exception\DatabaseException;
|
||||
|
||||
/**
|
||||
* Database Forge Class
|
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
use FuzeWorks\Logger;
|
||||
use FuzeWorks\DatabaseException;
|
||||
use FuzeWorks\Exception\DatabaseException;
|
||||
|
||||
/**
|
||||
* Query Builder Class
|
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
use FuzeWorks\Logger;
|
||||
use FuzeWorks\DatabaseException;
|
||||
use FuzeWorks\Exception\DatabaseException;
|
||||
|
||||
/**
|
||||
* Database Result Class
|
|
@ -33,7 +33,7 @@
|
|||
use FuzeWorks\Logger;
|
||||
use FuzeWorks\Helpers;
|
||||
use FuzeWorks\Libraries;
|
||||
use FuzeWorks\DatabaseException;
|
||||
use FuzeWorks\Exception\DatabaseException;
|
||||
|
||||
/**
|
||||
* Database Utility Class
|
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
use FuzeWorks\Logger;
|
||||
use FuzeWorks\DatabaseException;
|
||||
use FuzeWorks\Exception\DatabaseException;
|
||||
|
||||
/**
|
||||
* MySQL Database Adapter Class
|
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
use FuzeWorks\Logger;
|
||||
use FuzeWorks\DatabaseException;
|
||||
use FuzeWorks\Exception\DatabaseException;
|
||||
use PDOException;
|
||||
|
||||
/**
|
|
@ -30,6 +30,8 @@
|
|||
* @version Version 0.0.1
|
||||
*/
|
||||
|
||||
use \Exception;
|
||||
|
||||
/**
|
||||
* PDO Result Class
|
||||
*
|
|
@ -31,6 +31,7 @@
|
|||
*/
|
||||
|
||||
use FuzeWorks\Logger;
|
||||
use \Exception;
|
||||
|
||||
/**
|
||||
* SQLite3 Database Adapter Class
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
namespace FuzeWorks;
|
||||
use FuzeWorks\ConfigORM\ConfigORM;
|
||||
use FuzeWorks\Exception\ConfigException;
|
||||
|
||||
/**
|
||||
* Config Class.
|
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
namespace FuzeWorks\ConfigORM;
|
||||
use ConfigException;
|
||||
use FuzeWorks\Exception\ConfigException;
|
||||
|
||||
/**
|
||||
* ORM class for config files in PHP files.
|
|
@ -31,6 +31,7 @@
|
|||
*/
|
||||
|
||||
namespace FuzeWorks;
|
||||
use FuzeWorks\Exception\InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* Class Configurator.
|
|
@ -31,6 +31,8 @@
|
|||
*/
|
||||
|
||||
namespace FuzeWorks;
|
||||
use FuzeWorks\Exception\Exception;
|
||||
use FuzeWorks\Expectation\CoreException;
|
||||
|
||||
/**
|
||||
* FuzeWorks Core.
|
|
@ -64,15 +64,3 @@ class Event
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace FuzeWorks\Event;
|
||||
|
||||
/**
|
||||
* Simple event which will notify components of an event, but does not contain any data.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class NotifierEvent extends \FuzeWorks\Event
|
||||
{
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
/**
|
||||
* FuzeWorks.
|
||||
*
|
||||
* The FuzeWorks MVC PHP FrameWork
|
||||
*
|
||||
* Copyright (C) 2015 TechFuze
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author TechFuze
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
* @copyright Copyright (c) 1996 - 2015, Free Software Foundation, Inc. (http://www.fsf.org/)
|
||||
* @license http://opensource.org/licenses/GPL-3.0 GPLv3 License
|
||||
*
|
||||
* @link http://fuzeworks.techfuze.net
|
||||
* @since Version 0.0.1
|
||||
*
|
||||
* @version Version 0.0.1
|
||||
*/
|
||||
|
||||
namespace FuzeWorks\Event;
|
||||
use FuzeWorks\Event;
|
||||
|
||||
/**
|
||||
* Simple event which will notify components of an event, but does not contain any data.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class NotifierEvent extends Event
|
||||
{
|
||||
}
|
||||
|
||||
?>
|
|
@ -31,6 +31,8 @@
|
|||
*/
|
||||
|
||||
namespace FuzeWorks;
|
||||
use FuzeWorks\Exception\EventException;
|
||||
use FuzeWorks\Exception\ModuleException;
|
||||
|
||||
/**
|
||||
* Class Events.
|
||||
|
@ -90,7 +92,7 @@ class Events
|
|||
public static function addListener($callback, $eventName, $priority = EventPriority::NORMAL)
|
||||
{
|
||||
if (EventPriority::getPriority($priority) == false) {
|
||||
throw new Exception('Unknown priority '.$priority);
|
||||
throw new EventException('Unknown priority '.$priority);
|
||||
}
|
||||
|
||||
if (!isset(self::$listeners[$eventName])) {
|
||||
|
@ -118,7 +120,7 @@ class Events
|
|||
public static function removeListener($callback, $eventName, $priority = EventPriority::NORMAL)
|
||||
{
|
||||
if (EventPriority::getPriority($priority) == false) {
|
||||
throw new Exception('Unknown priority '.$priority);
|
||||
throw new EventException('Unknown priority '.$priority);
|
||||
}
|
||||
|
||||
if (!isset(self::$listeners[$eventName])) {
|
||||
|
@ -169,7 +171,7 @@ class Events
|
|||
$eventClass = '\FuzeWorks\Event\NotifierEvent';
|
||||
} else {
|
||||
// No notify-event: we tried all we could
|
||||
throw new Exception('Event '.$eventName.' could not be found!');
|
||||
throw new EventException('Event '.$eventName.' could not be found!');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* FuzeWorks.
|
||||
*
|
||||
* The FuzeWorks MVC PHP FrameWork
|
||||
*
|
||||
* Copyright (C) 2015 TechFuze
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author TechFuze
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
* @copyright Copyright (c) 1996 - 2015, Free Software Foundation, Inc. (http://www.fsf.org/)
|
||||
* @license http://opensource.org/licenses/GPL-3.0 GPLv3 License
|
||||
*
|
||||
* @link http://fuzeworks.techfuze.net
|
||||
* @since Version 0.0.1
|
||||
*
|
||||
* @version Version 0.0.1
|
||||
*/
|
||||
|
||||
namespace FuzeWorks\Exception;
|
||||
|
||||
/**
|
||||
* Class ConfigException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class ConfigException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* FuzeWorks.
|
||||
*
|
||||
* The FuzeWorks MVC PHP FrameWork
|
||||
*
|
||||
* Copyright (C) 2015 TechFuze
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author TechFuze
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
* @copyright Copyright (c) 1996 - 2015, Free Software Foundation, Inc. (http://www.fsf.org/)
|
||||
* @license http://opensource.org/licenses/GPL-3.0 GPLv3 License
|
||||
*
|
||||
* @link http://fuzeworks.techfuze.net
|
||||
* @since Version 0.0.1
|
||||
*
|
||||
* @version Version 0.0.1
|
||||
*/
|
||||
|
||||
namespace FuzeWorks\Exception;
|
||||
|
||||
/**
|
||||
* Class CoreException.
|
||||
*
|
||||
* @author Abel Hoogeveen <abel@techfuze.net>
|
||||
* @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net)
|
||||
*/
|
||||
class CoreException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
?>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue