added simple math and charts modules
This commit is contained in:
1 parent
62a5f3c97c
commit
688ff42752
196 files changed
+20285
-8
No files matched your search
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
use Exception;
|
||||
|
||||
class AbstractEvalMathException extends Exception implements EvalMathException
|
||||
{
|
||||
protected $error = '';
|
||||
|
||||
public function __construct(array $parameters=[])
|
||||
{
|
||||
$message = strtr($this->error, $parameters);
|
||||
parent::__construct($message);
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class BuiltInFunctionRedefinitionException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = 'Cannot redefine built-in function :function()';
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class ConstantAssignmentException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = 'Cannot assign to constant :constant';
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class DivisionByZeroException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = 'Division by zero';
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
interface EvalMathException
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class ExpectingTokenException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = "Expecting ':token'";
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class IllegalCharacterException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = "illegal character ':character'";
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class InternalErrorException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = 'Internal error';
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class InvalidArgumentCountException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = 'Wrong number of arguments';
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class OperatorLacksOperandException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = "operator ':operator' lacks operand";
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class OperatorRequiredException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = 'Operator required';
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class UndefinedVariableException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = "Undefined variable";
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class UndefinedVariableInFunctionDefinitionException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = 'Undefined variable :token in function definition';
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class UnexpectedOperatorException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = 'Unexpected operator \':operator\'';
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Serge Rodovnichenko <serge@syrnik.com>
|
||||
* @copyright Serge Rodovnichenko, 2019
|
||||
* @license BSD 2.0
|
||||
*/
|
||||
|
||||
namespace Andileco\Util\EvalMath\Exception;
|
||||
|
||||
|
||||
class UnexpectedTokenException extends AbstractEvalMathException
|
||||
{
|
||||
protected $message = 'Unexpected \':token\'';
|
||||
}
|
||||
Reference in new issue
Block a user