This commit is contained in:
2024-12-31 11:07:09 +01:00
parent df7915205d
commit e089172b15
1916 changed files with 165422 additions and 271 deletions

View File

@ -0,0 +1,20 @@
<?php
/**
* @author Tassos.gr <info@tassos.gr>
* @link https://www.tassos.gr
* @copyright Copyright © 2024 Tassos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
namespace NRFramework\Parser\Exceptions;
defined('_JEXEC') or die;
class ConditionValueException extends \Exception
{
public function __construct($condition_name)
{
parent::__construct("008 - Condition Value Error: The Condition '" . $condition_name . "' does not return a value.");
}
}

View File

@ -0,0 +1,20 @@
<?php
/**
* @author Tassos.gr <info@tassos.gr>
* @link https://www.tassos.gr
* @copyright Copyright © 2024 Tassos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
namespace NRFramework\Parser\Exceptions;
defined('_JEXEC') or die;
class InvalidConditionException extends \Exception
{
public function __construct($condition_name)
{
parent::__construct("002 - Invalid Condition: The condition '" . $condition_name . "' does not exist.");
}
}

View File

@ -0,0 +1,20 @@
<?php
/**
* @author Tassos.gr <info@tassos.gr>
* @link https://www.tassos.gr
* @copyright Copyright © 2024 Tassos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
namespace NRFramework\Parser\Exceptions;
defined('_JEXEC') or die;
class SyntaxErrorException extends \Exception
{
public function __construct($message)
{
parent::__construct("001 - Syntax Error: " . $message);
}
}

View File

@ -0,0 +1,20 @@
<?php
/**
* @author Tassos.gr <info@tassos.gr>
* @link https://www.tassos.gr
* @copyright Copyright © 2024 Tassos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
namespace NRFramework\Parser\Exceptions;
defined('_JEXEC') or die;
class UnknownFunctionException extends \Exception
{
public function __construct($func_name)
{
parent::__construct("007 - Unknown Function: " . $func_name);
}
}

View File

@ -0,0 +1,20 @@
<?php
/**
* @author Tassos.gr <info@tassos.gr>
* @link https://www.tassos.gr
* @copyright Copyright © 2024 Tassos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
namespace NRFramework\Parser\Exceptions;
defined('_JEXEC') or die;
class UnknownOperatorException extends \Exception
{
public function __construct($operator)
{
parent::__construct("003 - Unknown Comparison Operator: " . $operator);
}
}

View File

@ -0,0 +1,21 @@
<?php
/**
* @author Tassos.gr <info@tassos.gr>
* @link https://www.tassos.gr
* @copyright Copyright © 2024 Tassos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
namespace NRFramework\Parser\Exceptions;
defined('_JEXEC') or die;
class UnsupportedOperatorException extends \Exception
{
public function __construct($operator, $condition_name, $accepts_multi_values)
{
$message = 'The Comparison Operator "' . $operator . '" can only be used with Condition Operands that return ' . ($accepts_multi_values ? 'multiple values.' : 'single values.');
parent::__construct("005 - Unsupported Comparison Operator: " . $message);
}
}

View File

@ -0,0 +1,21 @@
<?php
/**
* @author Tassos.gr <info@tassos.gr>
* @link https://www.tassos.gr
* @copyright Copyright © 2024 Tassos All Rights Reserved
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/
namespace NRFramework\Parser\Exceptions;
defined('_JEXEC') or die;
class UnsupportedValueOperandException extends \Exception
{
public function __construct($operator, $accepts_multi_values)
{
$message = 'The Comparison Operator "' . $operator . '" can only be used with ' . ($accepts_multi_values ? 'multiple values.' : 'single values.');
parent::__construct("006 - Unsupported Value Operand: " . $message);
}
}