mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 23:08:41 +00:00
phpcs fix
This commit is contained in:
parent
65d76e11ea
commit
a49251c0bb
|
|
@ -35,7 +35,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Id.
|
* Id.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $id = 0;
|
protected int $id = 0;
|
||||||
|
|
@ -43,7 +43,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Names.
|
* Names.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $name1 = '';
|
protected string $name1 = '';
|
||||||
|
|
@ -51,7 +51,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Names.
|
* Names.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $name2 = '';
|
protected string $name2 = '';
|
||||||
|
|
@ -59,7 +59,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Names.
|
* Names.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $name3 = '';
|
protected string $name3 = '';
|
||||||
|
|
@ -67,7 +67,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Email.
|
* Email.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $email = '';
|
protected string $email = '';
|
||||||
|
|
@ -77,7 +77,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
*
|
*
|
||||||
* Used in order to make sure ips don't change
|
* Used in order to make sure ips don't change
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $origin = '';
|
protected string $origin = '';
|
||||||
|
|
@ -85,7 +85,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Login.
|
* Login.
|
||||||
*
|
*
|
||||||
* @var null|string
|
* @var null|string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ?string $login = null;
|
protected ?string $login = null;
|
||||||
|
|
@ -93,7 +93,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Last activity.
|
* Last activity.
|
||||||
*
|
*
|
||||||
* @var \DateTime
|
* @var \DateTime
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected \DateTime $lastActive;
|
protected \DateTime $lastActive;
|
||||||
|
|
@ -101,7 +101,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Last activity.
|
* Last activity.
|
||||||
*
|
*
|
||||||
* @var \DateTime
|
* @var \DateTime
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected \DateTime $createdAt;
|
protected \DateTime $createdAt;
|
||||||
|
|
@ -109,7 +109,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Groups.
|
* Groups.
|
||||||
*
|
*
|
||||||
* @var int[]
|
* @var int[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $groups = [];
|
protected array $groups = [];
|
||||||
|
|
@ -117,7 +117,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Password.
|
* Password.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $password = '';
|
protected string $password = '';
|
||||||
|
|
@ -125,7 +125,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Account type.
|
* Account type.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $type = AccountType::USER;
|
protected int $type = AccountType::USER;
|
||||||
|
|
@ -133,7 +133,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Account status.
|
* Account status.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $status = AccountStatus::INACTIVE;
|
protected int $status = AccountStatus::INACTIVE;
|
||||||
|
|
@ -141,7 +141,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Localization.
|
* Localization.
|
||||||
*
|
*
|
||||||
* @var Localization
|
* @var Localization
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected Localization $l11n;
|
protected Localization $l11n;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ final class AccountManager implements \Countable
|
||||||
/**
|
/**
|
||||||
* Accounts.
|
* Accounts.
|
||||||
*
|
*
|
||||||
* @var Account[]
|
* @var Account[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $accounts = [];
|
private array $accounts = [];
|
||||||
|
|
@ -40,7 +40,7 @@ final class AccountManager implements \Countable
|
||||||
/**
|
/**
|
||||||
* Session.
|
* Session.
|
||||||
*
|
*
|
||||||
* @var SessionInterface
|
* @var SessionInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private SessionInterface $session;
|
private SessionInterface $session;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class Group implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Group id.
|
* Group id.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $id = 0;
|
protected int $id = 0;
|
||||||
|
|
@ -38,7 +38,7 @@ class Group implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Group name.
|
* Group name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $name = '';
|
protected string $name = '';
|
||||||
|
|
@ -46,7 +46,7 @@ class Group implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Group name.
|
* Group name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $description = '';
|
protected string $description = '';
|
||||||
|
|
@ -54,7 +54,7 @@ class Group implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Group members.
|
* Group members.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $members = [];
|
protected array $members = [];
|
||||||
|
|
@ -62,7 +62,7 @@ class Group implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Parents.
|
* Parents.
|
||||||
*
|
*
|
||||||
* @var int[]
|
* @var int[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $parents = [];
|
protected array $parents = [];
|
||||||
|
|
@ -70,7 +70,7 @@ class Group implements ArrayableInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Group status.
|
* Group status.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $status = GroupStatus::INACTIVE;
|
protected int $status = GroupStatus::INACTIVE;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class PermissionAbstract implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Permission id.
|
* Permission id.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $id = 0;
|
protected int $id = 0;
|
||||||
|
|
@ -38,7 +38,7 @@ class PermissionAbstract implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Unit id.
|
* Unit id.
|
||||||
*
|
*
|
||||||
* @var null|int
|
* @var null|int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ?int $unit = null;
|
protected ?int $unit = null;
|
||||||
|
|
@ -46,7 +46,7 @@ class PermissionAbstract implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* App name.
|
* App name.
|
||||||
*
|
*
|
||||||
* @var null|string
|
* @var null|string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ?string $app = null;
|
protected ?string $app = null;
|
||||||
|
|
@ -54,7 +54,7 @@ class PermissionAbstract implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Module id.
|
* Module id.
|
||||||
*
|
*
|
||||||
* @var null|string
|
* @var null|string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ?string $module = null;
|
protected ?string $module = null;
|
||||||
|
|
@ -62,7 +62,7 @@ class PermissionAbstract implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Providing module id.
|
* Providing module id.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $from = 0;
|
protected int $from = 0;
|
||||||
|
|
@ -70,7 +70,7 @@ class PermissionAbstract implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Type.
|
* Type.
|
||||||
*
|
*
|
||||||
* @var null|int
|
* @var null|int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ?int $type = null;
|
protected ?int $type = null;
|
||||||
|
|
@ -78,7 +78,7 @@ class PermissionAbstract implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Element id.
|
* Element id.
|
||||||
*
|
*
|
||||||
* @var null|int
|
* @var null|int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ?int $element = null;
|
protected ?int $element = null;
|
||||||
|
|
@ -86,7 +86,7 @@ class PermissionAbstract implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Component id.
|
* Component id.
|
||||||
*
|
*
|
||||||
* @var null|int
|
* @var null|int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ?int $component = null;
|
protected ?int $component = null;
|
||||||
|
|
@ -94,7 +94,7 @@ class PermissionAbstract implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Permission.
|
* Permission.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $permission = PermissionType::NONE;
|
protected int $permission = PermissionType::NONE;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ trait PermissionHandlingTrait
|
||||||
/**
|
/**
|
||||||
* Permissions.
|
* Permissions.
|
||||||
*
|
*
|
||||||
* @var PermissionAbstract[]
|
* @var PermissionAbstract[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $permissions = [];
|
protected array $permissions = [];
|
||||||
|
|
@ -39,7 +39,7 @@ trait PermissionHandlingTrait
|
||||||
/**
|
/**
|
||||||
* Amount of permissions.
|
* Amount of permissions.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $pLength = 0;
|
private int $pLength = 0;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class Kmeans
|
||||||
/**
|
/**
|
||||||
* Metric to calculate the distance between two points
|
* Metric to calculate the distance between two points
|
||||||
*
|
*
|
||||||
* @var \Closure
|
* @var \Closure
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private \Closure $metric;
|
private \Closure $metric;
|
||||||
|
|
@ -35,7 +35,7 @@ final class Kmeans
|
||||||
/**
|
/**
|
||||||
* Amount of different clusters
|
* Amount of different clusters
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $clusters = 1;
|
private int $clusters = 1;
|
||||||
|
|
@ -43,7 +43,7 @@ final class Kmeans
|
||||||
/**
|
/**
|
||||||
* Points of the cluster centers
|
* Points of the cluster centers
|
||||||
*
|
*
|
||||||
* @var PointInterface[]
|
* @var PointInterface[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $clusterCenters = [];
|
private $clusterCenters = [];
|
||||||
|
|
@ -51,7 +51,7 @@ final class Kmeans
|
||||||
/**
|
/**
|
||||||
* Points to clusterize
|
* Points to clusterize
|
||||||
*
|
*
|
||||||
* @var PointInterface[]
|
* @var PointInterface[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $points = [];
|
private array $points = [];
|
||||||
|
|
@ -61,7 +61,7 @@ final class Kmeans
|
||||||
*
|
*
|
||||||
* @param PointInterface[] $points Points to cluster
|
* @param PointInterface[] $points Points to cluster
|
||||||
* @param int $clusters Amount of clusters
|
* @param int $clusters Amount of clusters
|
||||||
* @param null|\Closure $metric Metric to use for the distance between two points.
|
* @param null|\Closure $metric metric to use for the distance between two points
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class Point implements PointInterface
|
||||||
/**
|
/**
|
||||||
* Coordinates of the point
|
* Coordinates of the point
|
||||||
*
|
*
|
||||||
* @var array<int, int|float>
|
* @var array<int, int|float>
|
||||||
* @sicne 1.0.0
|
* @sicne 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $coordinates = [];
|
private array $coordinates = [];
|
||||||
|
|
@ -35,7 +35,7 @@ class Point implements PointInterface
|
||||||
/**
|
/**
|
||||||
* Group or cluster this point belongs to
|
* Group or cluster this point belongs to
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $group = 0;
|
private int $group = 0;
|
||||||
|
|
@ -43,7 +43,7 @@ class Point implements PointInterface
|
||||||
/**
|
/**
|
||||||
* Name of the point
|
* Name of the point
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $name = '';
|
private string $name = '';
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class Job implements JobInterface
|
||||||
/**
|
/**
|
||||||
* Value of the job
|
* Value of the job
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $value = 0.0;
|
private float $value = 0.0;
|
||||||
|
|
@ -35,7 +35,7 @@ class Job implements JobInterface
|
||||||
/**
|
/**
|
||||||
* Start time of the job
|
* Start time of the job
|
||||||
*
|
*
|
||||||
* @var \DateTime
|
* @var \DateTime
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private \DateTime $start;
|
private \DateTime $start;
|
||||||
|
|
@ -43,7 +43,7 @@ class Job implements JobInterface
|
||||||
/**
|
/**
|
||||||
* End time of the job
|
* End time of the job
|
||||||
*
|
*
|
||||||
* @var \DateTime
|
* @var \DateTime
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private ?\DateTime $end = null;
|
private ?\DateTime $end = null;
|
||||||
|
|
@ -51,7 +51,7 @@ class Job implements JobInterface
|
||||||
/**
|
/**
|
||||||
* Name of the job
|
* Name of the job
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $name = '';
|
private string $name = '';
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class Backpack implements BackpackInterface
|
||||||
/**
|
/**
|
||||||
* Maximum amount of cost this backpack can hold
|
* Maximum amount of cost this backpack can hold
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $maxCost = 0.0;
|
private float $maxCost = 0.0;
|
||||||
|
|
@ -36,7 +36,7 @@ class Backpack implements BackpackInterface
|
||||||
/**
|
/**
|
||||||
* Current value
|
* Current value
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $value = 0.0;
|
private float $value = 0.0;
|
||||||
|
|
@ -44,7 +44,7 @@ class Backpack implements BackpackInterface
|
||||||
/**
|
/**
|
||||||
* Current cost
|
* Current cost
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $cost = 0.0;
|
private float $cost = 0.0;
|
||||||
|
|
@ -52,7 +52,7 @@ class Backpack implements BackpackInterface
|
||||||
/**
|
/**
|
||||||
* Items inside the backpack
|
* Items inside the backpack
|
||||||
*
|
*
|
||||||
* @var ItemInterface[]
|
* @var ItemInterface[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $items = [];
|
private array $items = [];
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ final class Bounded
|
||||||
for ($j = 0; $j <= $maxCost; ++$j) {
|
for ($j = 0; $j <= $maxCost; ++$j) {
|
||||||
$m[$i][$j] = $m[$i - 1][$j];
|
$m[$i][$j] = $m[$i - 1][$j];
|
||||||
|
|
||||||
for ($k = 1; $k <= $items[$i - 1]['quantity']; $k++) {
|
for ($k = 1; $k <= $items[$i - 1]['quantity']; ++$k) {
|
||||||
if ($k * ((int) $items[$i - 1]['item']->getCost()) > $j) {
|
if ($k * ((int) $items[$i - 1]['item']->getCost()) > $j) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -85,7 +85,7 @@ final class Bounded
|
||||||
$value = (int) $items[$i - 1]['item']->getValue();
|
$value = (int) $items[$i - 1]['item']->getValue();
|
||||||
|
|
||||||
for ($k = 0; $v !== $m[$i - 1][$j] + $k * $value; ++$k) {
|
for ($k = 0; $v !== $m[$i - 1][$j] + $k * $value; ++$k) {
|
||||||
$s++;
|
++$s;
|
||||||
$j -= (int) $items[$i - 1]['item']->getCost();
|
$j -= (int) $items[$i - 1]['item']->getCost();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ final class Continuous
|
||||||
*/
|
*/
|
||||||
public static function solve(array $items, BackpackInterface $backpack) : BackpackInterface
|
public static function solve(array $items, BackpackInterface $backpack) : BackpackInterface
|
||||||
{
|
{
|
||||||
usort($items, function($a, $b) {
|
\usort($items, function($a, $b) {
|
||||||
return $a['item']->getValue() / $a['item']->getCost() < $b['item']->getValue() / $b['item']->getCost();
|
return $a['item']->getValue() / $a['item']->getCost() < $b['item']->getValue() / $b['item']->getCost();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class Item implements ItemInterface
|
||||||
/**
|
/**
|
||||||
* Value of the item
|
* Value of the item
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $value = 0.0;
|
private float $value = 0.0;
|
||||||
|
|
@ -35,7 +35,7 @@ class Item implements ItemInterface
|
||||||
/**
|
/**
|
||||||
* Cost of the item
|
* Cost of the item
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $cost = 0.0;
|
private float $cost = 0.0;
|
||||||
|
|
@ -43,7 +43,7 @@ class Item implements ItemInterface
|
||||||
/**
|
/**
|
||||||
* Name of the item
|
* Name of the item
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $name = '';
|
private string $name = '';
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class AStarNode extends Node
|
||||||
/**
|
/**
|
||||||
* The g score is cost of the path
|
* The g score is cost of the path
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $g = 0.0;
|
private float $g = 0.0;
|
||||||
|
|
@ -35,7 +35,7 @@ class AStarNode extends Node
|
||||||
/**
|
/**
|
||||||
* The heuristic distance is the cost to the end node
|
* The heuristic distance is the cost to the end node
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private ?float $h = null;
|
private ?float $h = null;
|
||||||
|
|
@ -43,7 +43,7 @@ class AStarNode extends Node
|
||||||
/**
|
/**
|
||||||
* The f score is defined as f(n) = g(n) + h(n)
|
* The f score is defined as f(n) = g(n) + h(n)
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $f = 0.0;
|
private float $f = 0.0;
|
||||||
|
|
@ -51,7 +51,7 @@ class AStarNode extends Node
|
||||||
/**
|
/**
|
||||||
* Define as checked node
|
* Define as checked node
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $isClosed = false;
|
private bool $isClosed = false;
|
||||||
|
|
@ -59,7 +59,7 @@ class AStarNode extends Node
|
||||||
/**
|
/**
|
||||||
* Define as potential candidate
|
* Define as potential candidate
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $isOpened = false;
|
private bool $isOpened = false;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class Grid
|
||||||
/**
|
/**
|
||||||
* Grid system containing all nodes
|
* Grid system containing all nodes
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $nodes = [[]];
|
private array $nodes = [[]];
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class JumpPointNode extends Node
|
||||||
/**
|
/**
|
||||||
* The g score is cost of the path
|
* The g score is cost of the path
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $g = 0.0;
|
private float $g = 0.0;
|
||||||
|
|
@ -35,7 +35,7 @@ class JumpPointNode extends Node
|
||||||
/**
|
/**
|
||||||
* The heuristic distance is the cost to the end node
|
* The heuristic distance is the cost to the end node
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private ?float $h = null;
|
private ?float $h = null;
|
||||||
|
|
@ -43,7 +43,7 @@ class JumpPointNode extends Node
|
||||||
/**
|
/**
|
||||||
* The f score is defined as f(n) = g(n) + h(n)
|
* The f score is defined as f(n) = g(n) + h(n)
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $f = 0.0;
|
private float $f = 0.0;
|
||||||
|
|
@ -51,7 +51,7 @@ class JumpPointNode extends Node
|
||||||
/**
|
/**
|
||||||
* Define as checked node
|
* Define as checked node
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $isClosed = false;
|
private bool $isClosed = false;
|
||||||
|
|
@ -59,7 +59,7 @@ class JumpPointNode extends Node
|
||||||
/**
|
/**
|
||||||
* Define as potential candidate
|
* Define as potential candidate
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $isOpened = false;
|
private bool $isOpened = false;
|
||||||
|
|
@ -67,7 +67,7 @@ class JumpPointNode extends Node
|
||||||
/**
|
/**
|
||||||
* The node was already tested?
|
* The node was already tested?
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $isTested = false;
|
private bool $isTested = false;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class Node
|
||||||
/**
|
/**
|
||||||
* X-Coordinate.
|
* X-Coordinate.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $x = 0;
|
private int $x = 0;
|
||||||
|
|
@ -35,7 +35,7 @@ class Node
|
||||||
/**
|
/**
|
||||||
* Y-Coordinate.
|
* Y-Coordinate.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $y = 0;
|
private int $y = 0;
|
||||||
|
|
@ -43,7 +43,7 @@ class Node
|
||||||
/**
|
/**
|
||||||
* Cost of the node.
|
* Cost of the node.
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $weight = 1.0;
|
private float $weight = 1.0;
|
||||||
|
|
@ -51,7 +51,7 @@ class Node
|
||||||
/**
|
/**
|
||||||
* Can be walked?
|
* Can be walked?
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $isWalkable = true;
|
private bool $isWalkable = true;
|
||||||
|
|
@ -59,7 +59,7 @@ class Node
|
||||||
/**
|
/**
|
||||||
* Parent node.
|
* Parent node.
|
||||||
*
|
*
|
||||||
* @var null|Node
|
* @var null|Node
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private ?Node $parent = null;
|
private ?Node $parent = null;
|
||||||
|
|
@ -139,7 +139,7 @@ class Node
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setParent(?Node $node) : void
|
public function setParent(?self $node) : void
|
||||||
{
|
{
|
||||||
$this->parent = $node;
|
$this->parent = $node;
|
||||||
}
|
}
|
||||||
|
|
@ -151,7 +151,7 @@ class Node
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getParent() : ?Node
|
public function getParent() : ?self
|
||||||
{
|
{
|
||||||
return $this->parent;
|
return $this->parent;
|
||||||
}
|
}
|
||||||
|
|
@ -165,7 +165,7 @@ class Node
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function isEqual(Node $node) : bool
|
public function isEqual(self $node) : bool
|
||||||
{
|
{
|
||||||
return $this->x === $node->getX() && $this->y === $node->getY();
|
return $this->x === $node->getX() && $this->y === $node->getY();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class Path
|
||||||
/**
|
/**
|
||||||
* Nodes in the path
|
* Nodes in the path
|
||||||
*
|
*
|
||||||
* @var Node[]
|
* @var Node[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $nodes = [];
|
public array $nodes = [];
|
||||||
|
|
@ -35,7 +35,7 @@ class Path
|
||||||
/**
|
/**
|
||||||
* Grid this path belongs to
|
* Grid this path belongs to
|
||||||
*
|
*
|
||||||
* @var Grid
|
* @var Grid
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private Grid $grid;
|
private Grid $grid;
|
||||||
|
|
@ -43,7 +43,7 @@ class Path
|
||||||
/**
|
/**
|
||||||
* Nodes in the path
|
* Nodes in the path
|
||||||
*
|
*
|
||||||
* @var Node[]
|
* @var Node[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $expandedNodes = [];
|
private array $expandedNodes = [];
|
||||||
|
|
@ -51,7 +51,7 @@ class Path
|
||||||
/**
|
/**
|
||||||
* Path length
|
* Path length
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $length = 0.0;
|
private float $length = 0.0;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class TimSort implements SortInterface
|
||||||
/**
|
/**
|
||||||
* Blocks the sorting is divided into
|
* Blocks the sorting is divided into
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private const BLOCKS = 32;
|
private const BLOCKS = 32;
|
||||||
|
|
|
||||||
|
|
@ -14,19 +14,19 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpOMS;
|
namespace phpOMS;
|
||||||
|
|
||||||
use phpOMS\Router\RouterInterface;
|
|
||||||
use phpOMS\Log\FileLogger;
|
|
||||||
use phpOMS\Event\EventManager;
|
|
||||||
use phpOMS\Module\ModuleManager;
|
|
||||||
use phpOMS\Dispatcher\Dispatcher;
|
|
||||||
use phpOMS\Account\AccountManager;
|
use phpOMS\Account\AccountManager;
|
||||||
use phpOMS\Localization\L11nManager;
|
use phpOMS\Config\SettingsAbstract;
|
||||||
use phpOMS\Localization\Localization;
|
|
||||||
use phpOMS\DataStorage\Cache\CachePool;
|
use phpOMS\DataStorage\Cache\CachePool;
|
||||||
use phpOMS\DataStorage\Cookie\CookieJar;
|
use phpOMS\DataStorage\Cookie\CookieJar;
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
use phpOMS\DataStorage\Session\SessionInterface;
|
use phpOMS\DataStorage\Session\SessionInterface;
|
||||||
use phpOMS\Config\SettingsAbstract;
|
use phpOMS\Dispatcher\Dispatcher;
|
||||||
|
use phpOMS\Event\EventManager;
|
||||||
|
use phpOMS\Localization\L11nManager;
|
||||||
|
use phpOMS\Localization\Localization;
|
||||||
|
use phpOMS\Log\FileLogger;
|
||||||
|
use phpOMS\Module\ModuleManager;
|
||||||
|
use phpOMS\Router\RouterInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Application class.
|
* Application class.
|
||||||
|
|
@ -60,7 +60,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* App name.
|
* App name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $appName = '';
|
protected string $appName = '';
|
||||||
|
|
@ -68,7 +68,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* Organization id.
|
* Organization id.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $orgId = 0;
|
protected int $orgId = 0;
|
||||||
|
|
@ -76,7 +76,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* App theme.
|
* App theme.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $theme = '';
|
protected string $theme = '';
|
||||||
|
|
@ -84,7 +84,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* Database object.
|
* Database object.
|
||||||
*
|
*
|
||||||
* @var DatabasePool
|
* @var DatabasePool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected DatabasePool $dbPool;
|
protected DatabasePool $dbPool;
|
||||||
|
|
@ -92,7 +92,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* Application settings object.
|
* Application settings object.
|
||||||
*
|
*
|
||||||
* @var SettingsAbstract
|
* @var SettingsAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected SettingsAbstract $appSettings;
|
protected SettingsAbstract $appSettings;
|
||||||
|
|
@ -100,7 +100,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* Account manager instance.
|
* Account manager instance.
|
||||||
*
|
*
|
||||||
* @var AccountManager
|
* @var AccountManager
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected AccountManager $accountManager;
|
protected AccountManager $accountManager;
|
||||||
|
|
@ -108,7 +108,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* Cache instance.
|
* Cache instance.
|
||||||
*
|
*
|
||||||
* @var CachePool
|
* @var CachePool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected CachePool $cachePool;
|
protected CachePool $cachePool;
|
||||||
|
|
@ -116,7 +116,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* ModuleManager instance.
|
* ModuleManager instance.
|
||||||
*
|
*
|
||||||
* @var ModuleManager
|
* @var ModuleManager
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ModuleManager $moduleManager;
|
protected ModuleManager $moduleManager;
|
||||||
|
|
@ -124,7 +124,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* Router instance.
|
* Router instance.
|
||||||
*
|
*
|
||||||
* @var RouterInterface
|
* @var RouterInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected RouterInterface $router;
|
protected RouterInterface $router;
|
||||||
|
|
@ -132,7 +132,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* Dispatcher instance.
|
* Dispatcher instance.
|
||||||
*
|
*
|
||||||
* @var Dispatcher
|
* @var Dispatcher
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected Dispatcher $dispatcher;
|
protected Dispatcher $dispatcher;
|
||||||
|
|
@ -140,7 +140,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* Session instance.
|
* Session instance.
|
||||||
*
|
*
|
||||||
* @var SessionInterface
|
* @var SessionInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected SessionInterface $sessionManager;
|
protected SessionInterface $sessionManager;
|
||||||
|
|
@ -148,7 +148,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* Cookie instance.
|
* Cookie instance.
|
||||||
*
|
*
|
||||||
* @var CookieJar
|
* @var CookieJar
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected CookieJar $cookieJar;
|
protected CookieJar $cookieJar;
|
||||||
|
|
@ -156,7 +156,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* Server localization.
|
* Server localization.
|
||||||
*
|
*
|
||||||
* @var Localization
|
* @var Localization
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected Localization $l11nServer;
|
protected Localization $l11nServer;
|
||||||
|
|
@ -164,7 +164,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* Server localization.
|
* Server localization.
|
||||||
*
|
*
|
||||||
* @var FileLogger
|
* @var FileLogger
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected FileLogger $logger;
|
protected FileLogger $logger;
|
||||||
|
|
@ -172,7 +172,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* L11n manager.
|
* L11n manager.
|
||||||
*
|
*
|
||||||
* @var L11nManager
|
* @var L11nManager
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected L11nManager $l11nManager;
|
protected L11nManager $l11nManager;
|
||||||
|
|
@ -180,7 +180,7 @@ class ApplicationAbstract
|
||||||
/**
|
/**
|
||||||
* Event manager.
|
* Event manager.
|
||||||
*
|
*
|
||||||
* @var EventManager
|
* @var EventManager
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected EventManager $eventManager;
|
protected EventManager $eventManager;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class AssetManager implements \Countable
|
||||||
/**
|
/**
|
||||||
* Assets.
|
* Assets.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $assets = [];
|
private array $assets = [];
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ final class Autoloader
|
||||||
/**
|
/**
|
||||||
* Base paths for autoloading
|
* Base paths for autoloading
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private static $paths = [
|
private static $paths = [
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ final class NetPromoterScore
|
||||||
/**
|
/**
|
||||||
* Score values
|
* Score values
|
||||||
*
|
*
|
||||||
* @var int[]
|
* @var int[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $scores = [];
|
private array $scores = [];
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ trait OptionsTrait
|
||||||
/**
|
/**
|
||||||
* Options.
|
* Options.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $options = [];
|
private array $options = [];
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpOMS\Config;
|
namespace phpOMS\Config;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\Query\Builder;
|
|
||||||
use phpOMS\DataStorage\Cache\CachePool;
|
use phpOMS\DataStorage\Cache\CachePool;
|
||||||
use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
|
use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
|
||||||
|
use phpOMS\DataStorage\Database\Query\Builder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings class.
|
* Settings class.
|
||||||
|
|
@ -35,7 +35,7 @@ abstract class SettingsAbstract implements OptionsInterface
|
||||||
/**
|
/**
|
||||||
* Cache manager (pool).
|
* Cache manager (pool).
|
||||||
*
|
*
|
||||||
* @var null|CachePool
|
* @var null|CachePool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ?CachePool $cache = null;
|
protected ?CachePool $cache = null;
|
||||||
|
|
@ -43,7 +43,7 @@ abstract class SettingsAbstract implements OptionsInterface
|
||||||
/**
|
/**
|
||||||
* Database connection instance.
|
* Database connection instance.
|
||||||
*
|
*
|
||||||
* @var ConnectionAbstract
|
* @var ConnectionAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ConnectionAbstract $connection;
|
protected ConnectionAbstract $connection;
|
||||||
|
|
@ -51,7 +51,7 @@ abstract class SettingsAbstract implements OptionsInterface
|
||||||
/**
|
/**
|
||||||
* Settings table.
|
* Settings table.
|
||||||
*
|
*
|
||||||
* @var null|string
|
* @var null|string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static ?string $table = null;
|
protected static ?string $table = null;
|
||||||
|
|
@ -59,7 +59,7 @@ abstract class SettingsAbstract implements OptionsInterface
|
||||||
/**
|
/**
|
||||||
* Columns to identify the value.
|
* Columns to identify the value.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $columns = [
|
protected static array $columns = [
|
||||||
|
|
@ -69,7 +69,7 @@ abstract class SettingsAbstract implements OptionsInterface
|
||||||
/**
|
/**
|
||||||
* Field where the actual value is stored.
|
* Field where the actual value is stored.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $valueField = 'option';
|
protected string $valueField = 'option';
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ final class CachePool implements DataStoragePoolInterface
|
||||||
/**
|
/**
|
||||||
* MemCache instance.
|
* MemCache instance.
|
||||||
*
|
*
|
||||||
* @var DataStorageConnectionInterface[]
|
* @var DataStorageConnectionInterface[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $pool = [];
|
private array $pool = [];
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ namespace phpOMS\DataStorage\Cache\Connection;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Cache\CacheStatus;
|
use phpOMS\DataStorage\Cache\CacheStatus;
|
||||||
use phpOMS\DataStorage\Cache\CacheType;
|
use phpOMS\DataStorage\Cache\CacheType;
|
||||||
use phpOMS\DataStorage\Cache\Connection\CacheValueType;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cache handler.
|
* Cache handler.
|
||||||
|
|
@ -36,7 +35,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
||||||
*
|
*
|
||||||
* This can be used externally to define queries and execute them.
|
* This can be used externally to define queries and execute them.
|
||||||
*
|
*
|
||||||
* @var mixed
|
* @var mixed
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $con = null;
|
protected $con = null;
|
||||||
|
|
@ -46,7 +45,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
||||||
*
|
*
|
||||||
* The database prefix name for unique table names
|
* The database prefix name for unique table names
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $prefix = '';
|
public string $prefix = '';
|
||||||
|
|
@ -54,7 +53,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
||||||
/**
|
/**
|
||||||
* Database data.
|
* Database data.
|
||||||
*
|
*
|
||||||
* @var null|string[]
|
* @var null|string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ?array $dbdata = null;
|
protected ?array $dbdata = null;
|
||||||
|
|
@ -62,7 +61,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
||||||
/**
|
/**
|
||||||
* Database type.
|
* Database type.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $type = CacheType::UNDEFINED;
|
protected string $type = CacheType::UNDEFINED;
|
||||||
|
|
@ -70,7 +69,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
||||||
/**
|
/**
|
||||||
* Database status.
|
* Database status.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $status = CacheStatus::CLOSED;
|
protected int $status = CacheStatus::CLOSED;
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ final class FileCache extends ConnectionAbstract
|
||||||
/**
|
/**
|
||||||
* Delimiter for cache meta data
|
* Delimiter for cache meta data
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private const DELIM = '$';
|
private const DELIM = '$';
|
||||||
|
|
@ -66,7 +66,7 @@ final class FileCache extends ConnectionAbstract
|
||||||
/**
|
/**
|
||||||
* File path sanitizer
|
* File path sanitizer
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private const SANITIZE = '~';
|
private const SANITIZE = '~';
|
||||||
|
|
@ -74,7 +74,7 @@ final class FileCache extends ConnectionAbstract
|
||||||
/**
|
/**
|
||||||
* Only cache if data is larger than threshold (0-100).
|
* Only cache if data is larger than threshold (0-100).
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $threshold = 50;
|
private int $threshold = 50;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ final class MemCached extends ConnectionAbstract
|
||||||
/**
|
/**
|
||||||
* Only cache if data is larger than threshold (0-100).
|
* Only cache if data is larger than threshold (0-100).
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $threshold = 0;
|
private int $threshold = 0;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ use phpOMS\DataStorage\Cache\CacheStatus;
|
||||||
use phpOMS\DataStorage\Cache\CacheType;
|
use phpOMS\DataStorage\Cache\CacheType;
|
||||||
use phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException;
|
use phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException;
|
||||||
use phpOMS\Stdlib\Base\Exception\InvalidEnumValue;
|
use phpOMS\Stdlib\Base\Exception\InvalidEnumValue;
|
||||||
use phpOMS\DataStorage\Cache\Connection\CacheValueType;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RedisCache class.
|
* RedisCache class.
|
||||||
|
|
@ -38,7 +37,7 @@ final class RedisCache extends ConnectionAbstract
|
||||||
/**
|
/**
|
||||||
* Delimiter for cache meta data
|
* Delimiter for cache meta data
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private const DELIM = '$';
|
private const DELIM = '$';
|
||||||
|
|
|
||||||
|
|
@ -29,14 +29,14 @@ final class CookieJar
|
||||||
/**
|
/**
|
||||||
* Locked.
|
* Locked.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private static bool $isLocked = false;
|
private static bool $isLocked = false;
|
||||||
/**
|
/**
|
||||||
* Cookie values.
|
* Cookie values.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $cookies = [];
|
private array $cookies = [];
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpOMS\DataStorage\Database;
|
namespace phpOMS\DataStorage\Database;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\Query\QueryType;
|
|
||||||
use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
|
use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
|
||||||
|
use phpOMS\DataStorage\Database\Query\QueryType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Database query builder.
|
* Database query builder.
|
||||||
|
|
@ -30,7 +30,7 @@ abstract class BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Grammar.
|
* Grammar.
|
||||||
*
|
*
|
||||||
* @var GrammarAbstract
|
* @var GrammarAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected GrammarAbstract $grammar;
|
protected GrammarAbstract $grammar;
|
||||||
|
|
@ -38,7 +38,7 @@ abstract class BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Database connection.
|
* Database connection.
|
||||||
*
|
*
|
||||||
* @var ConnectionAbstract
|
* @var ConnectionAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ConnectionAbstract $connection;
|
protected ConnectionAbstract $connection;
|
||||||
|
|
@ -46,7 +46,7 @@ abstract class BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Query type.
|
* Query type.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $type = QueryType::NONE;
|
protected int $type = QueryType::NONE;
|
||||||
|
|
@ -54,7 +54,7 @@ abstract class BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Prefix.
|
* Prefix.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $prefix = '';
|
protected string $prefix = '';
|
||||||
|
|
@ -62,7 +62,7 @@ abstract class BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Raw.
|
* Raw.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $raw = '';
|
public string $raw = '';
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
||||||
*
|
*
|
||||||
* This can be used externally to define queries and execute them.
|
* This can be used externally to define queries and execute them.
|
||||||
*
|
*
|
||||||
* @var \PDO
|
* @var \PDO
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public \PDO $con;
|
public \PDO $con;
|
||||||
|
|
@ -52,7 +52,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
||||||
*
|
*
|
||||||
* The database prefix name for unique table names
|
* The database prefix name for unique table names
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $prefix = '';
|
public string $prefix = '';
|
||||||
|
|
@ -60,7 +60,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
||||||
/**
|
/**
|
||||||
* Database data.
|
* Database data.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $dbdata = [];
|
protected array $dbdata = [];
|
||||||
|
|
@ -68,7 +68,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
||||||
/**
|
/**
|
||||||
* Database type.
|
* Database type.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $type = DatabaseType::UNDEFINED;
|
protected string $type = DatabaseType::UNDEFINED;
|
||||||
|
|
@ -76,7 +76,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
||||||
/**
|
/**
|
||||||
* Database status.
|
* Database status.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $status = DatabaseStatus::CLOSED;
|
protected int $status = DatabaseStatus::CLOSED;
|
||||||
|
|
@ -84,7 +84,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
||||||
/**
|
/**
|
||||||
* Database grammar.
|
* Database grammar.
|
||||||
*
|
*
|
||||||
* @var Grammar
|
* @var Grammar
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected Grammar $grammar;
|
protected Grammar $grammar;
|
||||||
|
|
@ -92,7 +92,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
||||||
/**
|
/**
|
||||||
* Database grammar.
|
* Database grammar.
|
||||||
*
|
*
|
||||||
* @var SchemaGrammar
|
* @var SchemaGrammar
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected SchemaGrammar $schemaGrammar;
|
protected SchemaGrammar $schemaGrammar;
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Database connection.
|
* Database connection.
|
||||||
*
|
*
|
||||||
* @var ConnectionAbstract
|
* @var ConnectionAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static ConnectionAbstract $db;
|
protected static ConnectionAbstract $db;
|
||||||
|
|
@ -145,7 +145,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Overwriting extended values.
|
* Overwriting extended values.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static bool $overwrite = true;
|
protected static bool $overwrite = true;
|
||||||
|
|
@ -153,7 +153,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $primaryField = '';
|
protected static string $primaryField = '';
|
||||||
|
|
@ -161,7 +161,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $createdAt = '';
|
protected static string $createdAt = '';
|
||||||
|
|
@ -169,7 +169,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Language
|
* Language
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $languageField = '';
|
protected static string $languageField = '';
|
||||||
|
|
@ -177,7 +177,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, string>>
|
* @var array<string, array<string, string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $columns = [];
|
protected static array $columns = [];
|
||||||
|
|
@ -187,7 +187,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
*
|
*
|
||||||
* Most often used for localizations
|
* Most often used for localizations
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, string>>
|
* @var array<string, array<string, string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $conditionals = [];
|
protected static array $conditionals = [];
|
||||||
|
|
@ -195,7 +195,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Has many relation.
|
* Has many relation.
|
||||||
*
|
*
|
||||||
* @var array<string, array>
|
* @var array<string, array>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $hasMany = [];
|
protected static array $hasMany = [];
|
||||||
|
|
@ -205,7 +205,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
*
|
*
|
||||||
* Relation is defined in current mapper
|
* Relation is defined in current mapper
|
||||||
*
|
*
|
||||||
* @var array<string, array>
|
* @var array<string, array>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $ownsOne = [];
|
protected static array $ownsOne = [];
|
||||||
|
|
@ -215,12 +215,12 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
*
|
*
|
||||||
* Relation is defined in current mapper
|
* Relation is defined in current mapper
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/ /**
|
*/ /**
|
||||||
* Belongs to.
|
* Belongs to.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, string>>
|
* @var array<string, array<string, string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $belongsTo = [];
|
protected static array $belongsTo = [];
|
||||||
|
|
@ -228,7 +228,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Table.
|
* Table.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $table = '';
|
protected static string $table = '';
|
||||||
|
|
@ -236,7 +236,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Fields to load.
|
* Fields to load.
|
||||||
*
|
*
|
||||||
* @var array[]
|
* @var array[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $fields = [];
|
protected static array $fields = [];
|
||||||
|
|
@ -244,7 +244,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Initialized objects for cross reference to reduce initialization costs
|
* Initialized objects for cross reference to reduce initialization costs
|
||||||
*
|
*
|
||||||
* @var array[]
|
* @var array[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $initObjects = [];
|
protected static array $initObjects = [];
|
||||||
|
|
@ -252,7 +252,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Initialized arrays for cross reference to reduce initialization costs
|
* Initialized arrays for cross reference to reduce initialization costs
|
||||||
*
|
*
|
||||||
* @var array[]
|
* @var array[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $initArrays = [];
|
protected static array $initArrays = [];
|
||||||
|
|
@ -260,7 +260,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Highest mapper to know when to clear initialized objects
|
* Highest mapper to know when to clear initialized objects
|
||||||
*
|
*
|
||||||
* @var null|string
|
* @var null|string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static ?string $parentMapper = null;
|
protected static ?string $parentMapper = null;
|
||||||
|
|
@ -268,7 +268,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
/**
|
/**
|
||||||
* Extended value collection.
|
* Extended value collection.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $collection = [
|
protected static array $collection = [
|
||||||
|
|
@ -1030,8 +1030,8 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
try {
|
try {
|
||||||
self::$db->con->prepare($relQuery->toSql())->execute();
|
self::$db->con->prepare($relQuery->toSql())->execute();
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
var_dump($e->getMessage());
|
\var_dump($e->getMessage());
|
||||||
var_dump($relQuery->toSql());
|
\var_dump($relQuery->toSql());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpOMS\DataStorage\Database;
|
namespace phpOMS\DataStorage\Database;
|
||||||
|
|
||||||
|
use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
|
||||||
use phpOMS\DataStorage\Database\Connection\ConnectionFactory;
|
use phpOMS\DataStorage\Database\Connection\ConnectionFactory;
|
||||||
use phpOMS\DataStorage\Database\Connection\NullConnection;
|
use phpOMS\DataStorage\Database\Connection\NullConnection;
|
||||||
use phpOMS\DataStorage\DataStorageConnectionInterface;
|
use phpOMS\DataStorage\DataStorageConnectionInterface;
|
||||||
use phpOMS\DataStorage\DataStoragePoolInterface;
|
use phpOMS\DataStorage\DataStoragePoolInterface;
|
||||||
use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Database pool handler.
|
* Database pool handler.
|
||||||
|
|
@ -33,7 +33,7 @@ final class DatabasePool implements DataStoragePoolInterface
|
||||||
/**
|
/**
|
||||||
* Databases.
|
* Databases.
|
||||||
*
|
*
|
||||||
* @var ConnectionAbstract[]
|
* @var ConnectionAbstract[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $pool = [];
|
private array $pool = [];
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ abstract class GrammarAbstract
|
||||||
/**
|
/**
|
||||||
* Comment style.
|
* Comment style.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $comment = '--';
|
protected string $comment = '--';
|
||||||
|
|
@ -37,7 +37,7 @@ abstract class GrammarAbstract
|
||||||
/**
|
/**
|
||||||
* String quotes style.
|
* String quotes style.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $valueQuotes = '\'';
|
protected string $valueQuotes = '\'';
|
||||||
|
|
@ -45,7 +45,7 @@ abstract class GrammarAbstract
|
||||||
/**
|
/**
|
||||||
* System identifier.
|
* System identifier.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $systemIdentifier = '"';
|
protected string $systemIdentifier = '"';
|
||||||
|
|
@ -53,7 +53,7 @@ abstract class GrammarAbstract
|
||||||
/**
|
/**
|
||||||
* And operator.
|
* And operator.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $and = 'AND';
|
protected string $and = 'AND';
|
||||||
|
|
@ -61,7 +61,7 @@ abstract class GrammarAbstract
|
||||||
/**
|
/**
|
||||||
* Or operator.
|
* Or operator.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $or = 'OR';
|
protected string $or = 'OR';
|
||||||
|
|
@ -69,7 +69,7 @@ abstract class GrammarAbstract
|
||||||
/**
|
/**
|
||||||
* Table prefix.
|
* Table prefix.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $tablePrefix = '';
|
protected string $tablePrefix = '';
|
||||||
|
|
@ -77,7 +77,7 @@ abstract class GrammarAbstract
|
||||||
/**
|
/**
|
||||||
* Special keywords.
|
* Special keywords.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $specialKeywords = [
|
protected array $specialKeywords = [
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Is read only.
|
* Is read only.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected bool $isReadOnly = false;
|
protected bool $isReadOnly = false;
|
||||||
|
|
@ -48,7 +48,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $selects = [];
|
public array $selects = [];
|
||||||
|
|
@ -56,7 +56,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $random;
|
public array $random;
|
||||||
|
|
@ -64,7 +64,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $updates = [];
|
public array $updates = [];
|
||||||
|
|
@ -72,7 +72,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Stupid work around because value needs to be not null for it to work in Grammar.
|
* Stupid work around because value needs to be not null for it to work in Grammar.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $deletes = [1];
|
public array $deletes = [1];
|
||||||
|
|
@ -80,7 +80,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Into.
|
* Into.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $into = '';
|
public string $into = '';
|
||||||
|
|
@ -88,7 +88,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Into columns.
|
* Into columns.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $inserts = [];
|
public array $inserts = [];
|
||||||
|
|
@ -96,7 +96,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Into columns.
|
* Into columns.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $values = [];
|
public array $values = [];
|
||||||
|
|
@ -104,7 +104,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Into columns.
|
* Into columns.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $sets = [];
|
public array $sets = [];
|
||||||
|
|
@ -112,7 +112,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Distinct.
|
* Distinct.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public bool $distinct = false;
|
public bool $distinct = false;
|
||||||
|
|
@ -120,7 +120,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* From.
|
* From.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $from = [];
|
public array $from = [];
|
||||||
|
|
@ -128,7 +128,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Joins.
|
* Joins.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $joins = [];
|
public array $joins = [];
|
||||||
|
|
@ -136,7 +136,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Ons of joins.
|
* Ons of joins.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $ons = [];
|
public array $ons = [];
|
||||||
|
|
@ -144,7 +144,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Where.
|
* Where.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $wheres = [];
|
public array $wheres = [];
|
||||||
|
|
@ -152,7 +152,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Group.
|
* Group.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $groups = [];
|
public array $groups = [];
|
||||||
|
|
@ -160,7 +160,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Order.
|
* Order.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $orders = [];
|
public array $orders = [];
|
||||||
|
|
@ -168,7 +168,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Limit.
|
* Limit.
|
||||||
*
|
*
|
||||||
* @var null|int
|
* @var null|int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public ?int $limit = null;
|
public ?int $limit = null;
|
||||||
|
|
@ -176,7 +176,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Offset.
|
* Offset.
|
||||||
*
|
*
|
||||||
* @var null|int
|
* @var null|int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public ?int $offset = null;
|
public ?int $offset = null;
|
||||||
|
|
@ -184,7 +184,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Binds.
|
* Binds.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $binds = [];
|
private array $binds = [];
|
||||||
|
|
@ -192,7 +192,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Union.
|
* Union.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $unions = [];
|
public array $unions = [];
|
||||||
|
|
@ -200,7 +200,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Lock.
|
* Lock.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public bool $lock = false;
|
public bool $lock = false;
|
||||||
|
|
@ -208,7 +208,7 @@ class Builder extends BuilderAbstract
|
||||||
/**
|
/**
|
||||||
* Comparison OPERATORS.
|
* Comparison OPERATORS.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const OPERATORS = [
|
public const OPERATORS = [
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class Grammar extends GrammarAbstract
|
||||||
/**
|
/**
|
||||||
* Select components.
|
* Select components.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $selectComponents = [
|
protected array $selectComponents = [
|
||||||
|
|
@ -59,7 +59,7 @@ class Grammar extends GrammarAbstract
|
||||||
/**
|
/**
|
||||||
* Insert components.
|
* Insert components.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $insertComponents = [
|
protected array $insertComponents = [
|
||||||
|
|
@ -71,7 +71,7 @@ class Grammar extends GrammarAbstract
|
||||||
/**
|
/**
|
||||||
* Update components.
|
* Update components.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $updateComponents = [
|
protected array $updateComponents = [
|
||||||
|
|
@ -83,7 +83,7 @@ class Grammar extends GrammarAbstract
|
||||||
/**
|
/**
|
||||||
* Update components.
|
* Update components.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $deleteComponents = [
|
protected array $deleteComponents = [
|
||||||
|
|
@ -95,7 +95,7 @@ class Grammar extends GrammarAbstract
|
||||||
/**
|
/**
|
||||||
* Random components.
|
* Random components.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $randomComponents = [
|
protected array $randomComponents = [
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class MysqlGrammar extends Grammar
|
||||||
/**
|
/**
|
||||||
* System identifier.
|
* System identifier.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $systemIdentifier = '`';
|
protected string $systemIdentifier = '`';
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class SQLiteGrammar extends Grammar
|
||||||
/**
|
/**
|
||||||
* System identifier.
|
* System identifier.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $systemIdentifier = '`';
|
public string $systemIdentifier = '`';
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class Parameter
|
||||||
/**
|
/**
|
||||||
* Parameter name
|
* Parameter name
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $name = '';
|
private string $name = '';
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class Builder extends QueryBuilder
|
||||||
/**
|
/**
|
||||||
* Table to create.
|
* Table to create.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $createTable = '';
|
public string $createTable = '';
|
||||||
|
|
@ -42,7 +42,7 @@ class Builder extends QueryBuilder
|
||||||
/**
|
/**
|
||||||
* Fields.
|
* Fields.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $createFields = [];
|
public array $createFields = [];
|
||||||
|
|
@ -50,7 +50,7 @@ class Builder extends QueryBuilder
|
||||||
/**
|
/**
|
||||||
* Database to drop.
|
* Database to drop.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $dropDatabase = '';
|
public string $dropDatabase = '';
|
||||||
|
|
@ -58,7 +58,7 @@ class Builder extends QueryBuilder
|
||||||
/**
|
/**
|
||||||
* Table to drop.
|
* Table to drop.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $dropTable = '';
|
public string $dropTable = '';
|
||||||
|
|
@ -66,7 +66,7 @@ class Builder extends QueryBuilder
|
||||||
/**
|
/**
|
||||||
* Tables.
|
* Tables.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public array $selectTables = ['*'];
|
public array $selectTables = ['*'];
|
||||||
|
|
@ -74,7 +74,7 @@ class Builder extends QueryBuilder
|
||||||
/**
|
/**
|
||||||
* Select fields.
|
* Select fields.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $selectFields = '';
|
public string $selectFields = '';
|
||||||
|
|
@ -82,7 +82,7 @@ class Builder extends QueryBuilder
|
||||||
/**
|
/**
|
||||||
* @todo: ?????.
|
* @todo: ?????.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public bool $createTableSettings = true;
|
public bool $createTableSettings = true;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class Grammar extends QueryGrammar
|
||||||
/**
|
/**
|
||||||
* Drop components.
|
* Drop components.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $dropDatabaseComponents = [
|
protected array $dropDatabaseComponents = [
|
||||||
|
|
@ -45,7 +45,7 @@ class Grammar extends QueryGrammar
|
||||||
/**
|
/**
|
||||||
* Drop components.
|
* Drop components.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $dropTableComponents = [
|
protected array $dropTableComponents = [
|
||||||
|
|
@ -55,7 +55,7 @@ class Grammar extends QueryGrammar
|
||||||
/**
|
/**
|
||||||
* Select tables components.
|
* Select tables components.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $createTablesComponents = [
|
protected array $createTablesComponents = [
|
||||||
|
|
@ -67,7 +67,7 @@ class Grammar extends QueryGrammar
|
||||||
/**
|
/**
|
||||||
* Select tables components.
|
* Select tables components.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $tablesComponents = [
|
protected array $tablesComponents = [
|
||||||
|
|
@ -77,7 +77,7 @@ class Grammar extends QueryGrammar
|
||||||
/**
|
/**
|
||||||
* Select field components.
|
* Select field components.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $fieldsComponents = [
|
protected array $fieldsComponents = [
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class MysqlGrammar extends Grammar
|
||||||
/**
|
/**
|
||||||
* System identifier.
|
* System identifier.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $systemIdentifier = '`';
|
protected string $systemIdentifier = '`';
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class SQLiteGrammar extends Grammar
|
||||||
/**
|
/**
|
||||||
* System identifier.
|
* System identifier.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $systemIdentifier = '`';
|
protected string $systemIdentifier = '`';
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ class SchemaMapper
|
||||||
/**
|
/**
|
||||||
* Database connection.
|
* Database connection.
|
||||||
*
|
*
|
||||||
* @var ConnectionAbstract
|
* @var ConnectionAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected ConnectionAbstract $db;
|
protected ConnectionAbstract $db;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class ConsoleSession implements SessionInterface
|
||||||
/**
|
/**
|
||||||
* Is session locked/already set.
|
* Is session locked/already set.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $isLocked = false;
|
private bool $isLocked = false;
|
||||||
|
|
@ -39,7 +39,7 @@ class ConsoleSession implements SessionInterface
|
||||||
/**
|
/**
|
||||||
* Raw session data.
|
* Raw session data.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $sessionData = [];
|
private array $sessionData = [];
|
||||||
|
|
@ -47,7 +47,7 @@ class ConsoleSession implements SessionInterface
|
||||||
/**
|
/**
|
||||||
* Session ID.
|
* Session ID.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $sid;
|
private string $sid;
|
||||||
|
|
@ -55,7 +55,7 @@ class ConsoleSession implements SessionInterface
|
||||||
/**
|
/**
|
||||||
* Inactivity Interval.
|
* Inactivity Interval.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $inactivityInterval = 0;
|
private int $inactivityInterval = 0;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ final class ConsoleSessionHandler implements \SessionHandlerInterface, \SessionI
|
||||||
/**
|
/**
|
||||||
* File path for session
|
* File path for session
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $savePath;
|
private string $savePath;
|
||||||
|
|
@ -136,7 +136,7 @@ final class ConsoleSessionHandler implements \SessionHandlerInterface, \SessionI
|
||||||
{
|
{
|
||||||
$file = $this->savePath . '/sess_' . $id;
|
$file = $this->savePath . '/sess_' . $id;
|
||||||
if (\file_exists($file)) {
|
if (\file_exists($file)) {
|
||||||
unlink($file);
|
\unlink($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -153,7 +153,7 @@ final class ConsoleSessionHandler implements \SessionHandlerInterface, \SessionI
|
||||||
*/
|
*/
|
||||||
public function gc($maxlifetime)
|
public function gc($maxlifetime)
|
||||||
{
|
{
|
||||||
$files = \glob("$this->savePath/sess_*");
|
$files = \glob("{$this->savePath}/sess_*");
|
||||||
|
|
||||||
if ($files === false) {
|
if ($files === false) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -161,7 +161,7 @@ final class ConsoleSessionHandler implements \SessionHandlerInterface, \SessionI
|
||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
if (\filemtime($file) + $maxlifetime < \time() && \file_exists($file)) {
|
if (\filemtime($file) + $maxlifetime < \time() && \file_exists($file)) {
|
||||||
unlink($file);
|
\unlink($file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ final class HttpSession implements SessionInterface
|
||||||
/**
|
/**
|
||||||
* Is session locked/already set.
|
* Is session locked/already set.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $isLocked = false;
|
private bool $isLocked = false;
|
||||||
|
|
@ -40,7 +40,7 @@ final class HttpSession implements SessionInterface
|
||||||
/**
|
/**
|
||||||
* Raw session data.
|
* Raw session data.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $sessionData = [];
|
private array $sessionData = [];
|
||||||
|
|
@ -48,7 +48,7 @@ final class HttpSession implements SessionInterface
|
||||||
/**
|
/**
|
||||||
* Session ID.
|
* Session ID.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $sid;
|
private string $sid;
|
||||||
|
|
@ -56,7 +56,7 @@ final class HttpSession implements SessionInterface
|
||||||
/**
|
/**
|
||||||
* Inactivity Interval.
|
* Inactivity Interval.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $inactivityInterval = 0;
|
private int $inactivityInterval = 0;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ final class Dispatcher implements DispatcherInterface
|
||||||
/**
|
/**
|
||||||
* Application.
|
* Application.
|
||||||
*
|
*
|
||||||
* @var null|ApplicationAbstract
|
* @var null|ApplicationAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private ?ApplicationAbstract $app;
|
private ?ApplicationAbstract $app;
|
||||||
|
|
@ -42,7 +42,7 @@ final class Dispatcher implements DispatcherInterface
|
||||||
*
|
*
|
||||||
* Set in the module manager on module initialization.
|
* Set in the module manager on module initialization.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $controllers = [];
|
private array $controllers = [];
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ final class EventManager implements \Countable
|
||||||
/**
|
/**
|
||||||
* Events.
|
* Events.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $groups = [];
|
private array $groups = [];
|
||||||
|
|
@ -44,7 +44,7 @@ final class EventManager implements \Countable
|
||||||
/**
|
/**
|
||||||
* Callbacks.
|
* Callbacks.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $callbacks = [];
|
private array $callbacks = [];
|
||||||
|
|
@ -52,7 +52,7 @@ final class EventManager implements \Countable
|
||||||
/**
|
/**
|
||||||
* Dispatcher.
|
* Dispatcher.
|
||||||
*
|
*
|
||||||
* @var DispatcherInterface
|
* @var DispatcherInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private DispatcherInterface $dispatcher;
|
private DispatcherInterface $dispatcher;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class City
|
||||||
/**
|
/**
|
||||||
* City id.
|
* City id.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $id = 0;
|
private int $id = 0;
|
||||||
|
|
@ -35,7 +35,7 @@ final class City
|
||||||
/**
|
/**
|
||||||
* Country code.
|
* Country code.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $countryCode = '';
|
private string $countryCode = '';
|
||||||
|
|
@ -43,7 +43,7 @@ final class City
|
||||||
/**
|
/**
|
||||||
* State code.
|
* State code.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $state = '';
|
private string $state = '';
|
||||||
|
|
@ -51,7 +51,7 @@ final class City
|
||||||
/**
|
/**
|
||||||
* City name.
|
* City name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $name = '';
|
private string $name = '';
|
||||||
|
|
@ -59,7 +59,7 @@ final class City
|
||||||
/**
|
/**
|
||||||
* Postal code.
|
* Postal code.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $postal = 0;
|
private int $postal = 0;
|
||||||
|
|
@ -67,7 +67,7 @@ final class City
|
||||||
/**
|
/**
|
||||||
* Latitude.
|
* Latitude.
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $lat = 0.0;
|
private float $lat = 0.0;
|
||||||
|
|
@ -75,7 +75,7 @@ final class City
|
||||||
/**
|
/**
|
||||||
* Longitude.
|
* Longitude.
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $long = 0.0;
|
private float $long = 0.0;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class CityMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, bool|string>>
|
* @var array<string, array<string, bool|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $columns = [
|
protected static array $columns = [
|
||||||
|
|
@ -45,7 +45,7 @@ class CityMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Primary table.
|
* Primary table.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $table = 'city';
|
protected static string $table = 'city';
|
||||||
|
|
@ -53,7 +53,7 @@ class CityMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $primaryField = 'city_id';
|
protected static string $primaryField = 'city_id';
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class Country
|
||||||
/**
|
/**
|
||||||
* Country id.
|
* Country id.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $id = 0;
|
private $id = 0;
|
||||||
|
|
@ -35,7 +35,7 @@ final class Country
|
||||||
/**
|
/**
|
||||||
* Country name.
|
* Country name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $name = '';
|
private $name = '';
|
||||||
|
|
@ -43,7 +43,7 @@ final class Country
|
||||||
/**
|
/**
|
||||||
* Country code.
|
* Country code.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $code2 = '';
|
private $code2 = '';
|
||||||
|
|
@ -51,7 +51,7 @@ final class Country
|
||||||
/**
|
/**
|
||||||
* Country code.
|
* Country code.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $code3 = '';
|
private $code3 = '';
|
||||||
|
|
@ -59,7 +59,7 @@ final class Country
|
||||||
/**
|
/**
|
||||||
* Country code.
|
* Country code.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $numeric = 0;
|
private $numeric = 0;
|
||||||
|
|
@ -67,7 +67,7 @@ final class Country
|
||||||
/**
|
/**
|
||||||
* Country subdevision.
|
* Country subdevision.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $subdevision = '';
|
private $subdevision = '';
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class CountryMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, bool|string>>
|
* @var array<string, array<string, bool|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $columns = [
|
protected static array $columns = [
|
||||||
|
|
@ -44,7 +44,7 @@ class CountryMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Primary table.
|
* Primary table.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $table = 'country';
|
protected static string $table = 'country';
|
||||||
|
|
@ -52,7 +52,7 @@ class CountryMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $primaryField = 'country_id';
|
protected static string $primaryField = 'country_id';
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class Currency
|
||||||
/**
|
/**
|
||||||
* Currency id.
|
* Currency id.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $id = 0;
|
private int $id = 0;
|
||||||
|
|
@ -35,7 +35,7 @@ final class Currency
|
||||||
/**
|
/**
|
||||||
* Currency name.
|
* Currency name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $name = '';
|
private string $name = '';
|
||||||
|
|
@ -43,7 +43,7 @@ final class Currency
|
||||||
/**
|
/**
|
||||||
* Currency code.
|
* Currency code.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $code = '';
|
private string $code = '';
|
||||||
|
|
@ -51,7 +51,7 @@ final class Currency
|
||||||
/**
|
/**
|
||||||
* Currency code.
|
* Currency code.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $number = 0;
|
private int $number = 0;
|
||||||
|
|
@ -59,7 +59,7 @@ final class Currency
|
||||||
/**
|
/**
|
||||||
* Currency decimals.
|
* Currency decimals.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $decimals = 0;
|
private int $decimals = 0;
|
||||||
|
|
@ -67,7 +67,7 @@ final class Currency
|
||||||
/**
|
/**
|
||||||
* Currency countries.
|
* Currency countries.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $countries = '';
|
private string $countries = '';
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class CurrencyMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, bool|string>>
|
* @var array<string, array<string, bool|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $columns = [
|
protected static array $columns = [
|
||||||
|
|
@ -44,7 +44,7 @@ class CurrencyMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Primary table.
|
* Primary table.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $table = 'currency';
|
protected static string $table = 'currency';
|
||||||
|
|
@ -52,7 +52,7 @@ class CurrencyMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $primaryField = 'currency_id';
|
protected static string $primaryField = 'currency_id';
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class Iban
|
||||||
/**
|
/**
|
||||||
* Iban id.
|
* Iban id.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $id = 0;
|
private $id = 0;
|
||||||
|
|
@ -35,7 +35,7 @@ final class Iban
|
||||||
/**
|
/**
|
||||||
* Iban country.
|
* Iban country.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $country = '';
|
private $country = '';
|
||||||
|
|
@ -43,7 +43,7 @@ final class Iban
|
||||||
/**
|
/**
|
||||||
* Iban chars.
|
* Iban chars.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $chars = 2;
|
private $chars = 2;
|
||||||
|
|
@ -51,7 +51,7 @@ final class Iban
|
||||||
/**
|
/**
|
||||||
* Iban bban.
|
* Iban bban.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $bban = '';
|
private $bban = '';
|
||||||
|
|
@ -59,7 +59,7 @@ final class Iban
|
||||||
/**
|
/**
|
||||||
* Iban fields.
|
* Iban fields.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $fields = '';
|
private $fields = '';
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class IbanMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, bool|string>>
|
* @var array<string, array<string, bool|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $columns = [
|
protected static array $columns = [
|
||||||
|
|
@ -43,7 +43,7 @@ class IbanMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Primary table.
|
* Primary table.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $table = 'iban';
|
protected static string $table = 'iban';
|
||||||
|
|
@ -51,7 +51,7 @@ class IbanMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $primaryField = 'iban_id';
|
protected static string $primaryField = 'iban_id';
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class Language
|
||||||
/**
|
/**
|
||||||
* Language id.
|
* Language id.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $id = 0;
|
private int $id = 0;
|
||||||
|
|
@ -35,7 +35,7 @@ final class Language
|
||||||
/**
|
/**
|
||||||
* Language name.
|
* Language name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $name = '';
|
private string $name = '';
|
||||||
|
|
@ -43,7 +43,7 @@ final class Language
|
||||||
/**
|
/**
|
||||||
* Language native.
|
* Language native.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $native = '';
|
private string $native = '';
|
||||||
|
|
@ -51,7 +51,7 @@ final class Language
|
||||||
/**
|
/**
|
||||||
* Language code.
|
* Language code.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $code2 = '';
|
private string $code2 = '';
|
||||||
|
|
@ -59,7 +59,7 @@ final class Language
|
||||||
/**
|
/**
|
||||||
* Language code.
|
* Language code.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $code3 = '';
|
private string $code3 = '';
|
||||||
|
|
@ -67,7 +67,7 @@ final class Language
|
||||||
/**
|
/**
|
||||||
* Language code.
|
* Language code.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $code3Native = '';
|
private string $code3Native = '';
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class LanguageMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, bool|string>>
|
* @var array<string, array<string, bool|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $columns = [
|
protected static array $columns = [
|
||||||
|
|
@ -44,7 +44,7 @@ class LanguageMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Primary table.
|
* Primary table.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $table = 'language';
|
protected static string $table = 'language';
|
||||||
|
|
@ -52,7 +52,7 @@ class LanguageMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static string $primaryField = 'language_id';
|
protected static string $primaryField = 'language_id';
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ final class L11nManager
|
||||||
/**
|
/**
|
||||||
* Language.
|
* Language.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $language = [];
|
private array $language = [];
|
||||||
|
|
@ -38,7 +38,7 @@ final class L11nManager
|
||||||
/**
|
/**
|
||||||
* App Name.
|
* App Name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $appName;
|
private string $appName;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Country ID.
|
* Country ID.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $country = ISO3166TwoEnum::_USA;
|
private string $country = ISO3166TwoEnum::_USA;
|
||||||
|
|
@ -39,7 +39,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Timezone.
|
* Timezone.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $timezone = 'America/New_York';
|
private string $timezone = 'America/New_York';
|
||||||
|
|
@ -47,7 +47,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Language ISO code.
|
* Language ISO code.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $language = ISO639x1Enum::_EN;
|
private string $language = ISO639x1Enum::_EN;
|
||||||
|
|
@ -55,7 +55,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Currency.
|
* Currency.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $currency = ISO4217Enum::_USD;
|
private string $currency = ISO4217Enum::_USD;
|
||||||
|
|
@ -63,7 +63,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Number format.
|
* Number format.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $decimal = '.';
|
private string $decimal = '.';
|
||||||
|
|
@ -71,7 +71,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Number format.
|
* Number format.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $thousands = ',';
|
private string $thousands = ',';
|
||||||
|
|
@ -79,7 +79,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Angle type.
|
* Angle type.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $angle = AngleType::DEGREE;
|
private string $angle = AngleType::DEGREE;
|
||||||
|
|
@ -87,7 +87,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Temperature type.
|
* Temperature type.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $temperature = TemperatureType::CELSIUS;
|
private string $temperature = TemperatureType::CELSIUS;
|
||||||
|
|
@ -95,7 +95,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Time format.
|
* Time format.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $datetime = [];
|
private array $datetime = [];
|
||||||
|
|
@ -103,7 +103,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Weight.
|
* Weight.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $weight = [];
|
private array $weight = [];
|
||||||
|
|
@ -111,7 +111,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Speed.
|
* Speed.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $speed = [];
|
private array $speed = [];
|
||||||
|
|
@ -119,7 +119,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Length.
|
* Length.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $length = [];
|
private array $length = [];
|
||||||
|
|
@ -127,7 +127,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Area.
|
* Area.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $area = [];
|
private array $area = [];
|
||||||
|
|
@ -135,7 +135,7 @@ class Localization
|
||||||
/**
|
/**
|
||||||
* Volume.
|
* Volume.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $volume = [];
|
private array $volume = [];
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class Money implements \Serializable
|
||||||
/**
|
/**
|
||||||
* Max amount of decimals.
|
* Max amount of decimals.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const MAX_DECIMALS = 4;
|
public const MAX_DECIMALS = 4;
|
||||||
|
|
@ -35,7 +35,7 @@ final class Money implements \Serializable
|
||||||
/**
|
/**
|
||||||
* Thousands separator.
|
* Thousands separator.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $thousands = ',';
|
private string $thousands = ',';
|
||||||
|
|
@ -43,7 +43,7 @@ final class Money implements \Serializable
|
||||||
/**
|
/**
|
||||||
* Decimal separator.
|
* Decimal separator.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $decimal = '.';
|
private string $decimal = '.';
|
||||||
|
|
@ -51,7 +51,7 @@ final class Money implements \Serializable
|
||||||
/**
|
/**
|
||||||
* Currency symbol position
|
* Currency symbol position
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $position = 1;
|
private int $position = 1;
|
||||||
|
|
@ -59,7 +59,7 @@ final class Money implements \Serializable
|
||||||
/**
|
/**
|
||||||
* Currency symbol.
|
* Currency symbol.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $symbol = ISO4217SymbolEnum::_USD;
|
private string $symbol = ISO4217SymbolEnum::_USD;
|
||||||
|
|
@ -67,7 +67,7 @@ final class Money implements \Serializable
|
||||||
/**
|
/**
|
||||||
* Value.
|
* Value.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $value = 0;
|
private int $value = 0;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ final class FileLogger implements LoggerInterface
|
||||||
* Potential values are null or an array filled with log timings.
|
* Potential values are null or an array filled with log timings.
|
||||||
* This is used in order to profile code sections by ID.
|
* This is used in order to profile code sections by ID.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private static array $timings = [];
|
private static array $timings = [];
|
||||||
|
|
@ -47,7 +47,7 @@ final class FileLogger implements LoggerInterface
|
||||||
/**
|
/**
|
||||||
* Instance.
|
* Instance.
|
||||||
*
|
*
|
||||||
* @var FileLogger
|
* @var FileLogger
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static FileLogger $instance;
|
protected static FileLogger $instance;
|
||||||
|
|
@ -55,7 +55,7 @@ final class FileLogger implements LoggerInterface
|
||||||
/**
|
/**
|
||||||
* Verbose.
|
* Verbose.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected bool $verbose = false;
|
protected bool $verbose = false;
|
||||||
|
|
@ -65,7 +65,7 @@ final class FileLogger implements LoggerInterface
|
||||||
*
|
*
|
||||||
* Potential values are null or a valid file pointer
|
* Potential values are null or a valid file pointer
|
||||||
*
|
*
|
||||||
* @var false|resource
|
* @var false|resource
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $fp = false;
|
private $fp = false;
|
||||||
|
|
@ -73,7 +73,7 @@ final class FileLogger implements LoggerInterface
|
||||||
/**
|
/**
|
||||||
* Logging path
|
* Logging path
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $path;
|
private string $path;
|
||||||
|
|
@ -81,7 +81,7 @@ final class FileLogger implements LoggerInterface
|
||||||
/**
|
/**
|
||||||
* Is the logging file created
|
* Is the logging file created
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $created = false;
|
private bool $created = false;
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ final class Gamma
|
||||||
/**
|
/**
|
||||||
* approximation values.
|
* approximation values.
|
||||||
*
|
*
|
||||||
* @var float[]
|
* @var float[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private const LANCZOSAPPROXIMATION = [
|
private const LANCZOSAPPROXIMATION = [
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class Polygon implements D2ShapeInterface
|
||||||
/**
|
/**
|
||||||
* Epsilon for float comparison.
|
* Epsilon for float comparison.
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const EPSILON = 0.00001;
|
public const EPSILON = 0.00001;
|
||||||
|
|
@ -37,7 +37,7 @@ final class Polygon implements D2ShapeInterface
|
||||||
*
|
*
|
||||||
* These coordinates define the polygon
|
* These coordinates define the polygon
|
||||||
*
|
*
|
||||||
* @var array[]
|
* @var array[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $coord = [];
|
private array $coord = [];
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class Sphere implements D3ShapeInterface
|
||||||
/**
|
/**
|
||||||
* Radius.
|
* Radius.
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $radius = 0.0;
|
private float $radius = 0.0;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ final class CholeskyDecomposition
|
||||||
/**
|
/**
|
||||||
* L matrix.
|
* L matrix.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $L = [];
|
private array $L = [];
|
||||||
|
|
@ -39,7 +39,7 @@ final class CholeskyDecomposition
|
||||||
/**
|
/**
|
||||||
* Dimension of L
|
* Dimension of L
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $m = 0;
|
private int $m = 0;
|
||||||
|
|
@ -47,7 +47,7 @@ final class CholeskyDecomposition
|
||||||
/**
|
/**
|
||||||
* Is symmetric positiv definite
|
* Is symmetric positiv definite
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $isSpd = true;
|
private bool $isSpd = true;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ final class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Dimension m
|
* Dimension m
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $m = 0;
|
private int $m = 0;
|
||||||
|
|
@ -40,7 +40,7 @@ final class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Is symmetric
|
* Is symmetric
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $isSymmetric = true;
|
private bool $isSymmetric = true;
|
||||||
|
|
@ -48,7 +48,7 @@ final class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* A square matrix.
|
* A square matrix.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $A = [];
|
private array $A = [];
|
||||||
|
|
@ -56,7 +56,7 @@ final class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Eigenvectors
|
* Eigenvectors
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $V = [];
|
private array $V = [];
|
||||||
|
|
@ -64,7 +64,7 @@ final class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Eigenvalues
|
* Eigenvalues
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $D = [];
|
private array $D = [];
|
||||||
|
|
@ -72,7 +72,7 @@ final class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Eigenvalues
|
* Eigenvalues
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $E = [];
|
private array $E = [];
|
||||||
|
|
@ -80,7 +80,7 @@ final class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Hessenberg form
|
* Hessenberg form
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $H = [];
|
private array $H = [];
|
||||||
|
|
@ -88,7 +88,7 @@ final class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Non-symmetric storage
|
* Non-symmetric storage
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $ort = [];
|
private array $ort = [];
|
||||||
|
|
@ -96,7 +96,7 @@ final class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Complex scalar division
|
* Complex scalar division
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $cdivr = 0.0;
|
private float $cdivr = 0.0;
|
||||||
|
|
@ -104,7 +104,7 @@ final class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Complex scalar division
|
* Complex scalar division
|
||||||
*
|
*
|
||||||
* @var float
|
* @var float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private float $cdivi = 0.0;
|
private float $cdivi = 0.0;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ final class LUDecomposition
|
||||||
/**
|
/**
|
||||||
* LU matrix.
|
* LU matrix.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $LU = [];
|
private array $LU = [];
|
||||||
|
|
@ -39,7 +39,7 @@ final class LUDecomposition
|
||||||
/**
|
/**
|
||||||
* Dimension m
|
* Dimension m
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $m = 0;
|
private int $m = 0;
|
||||||
|
|
@ -47,7 +47,7 @@ final class LUDecomposition
|
||||||
/**
|
/**
|
||||||
* Dimension n
|
* Dimension n
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $n = 0;
|
private int $n = 0;
|
||||||
|
|
@ -55,7 +55,7 @@ final class LUDecomposition
|
||||||
/**
|
/**
|
||||||
* Pivot sign
|
* Pivot sign
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $pivSign = 1;
|
private int $pivSign = 1;
|
||||||
|
|
@ -63,7 +63,7 @@ final class LUDecomposition
|
||||||
/**
|
/**
|
||||||
* Pivot
|
* Pivot
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $piv = [];
|
private array $piv = [];
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class Matrix implements \ArrayAccess, \Iterator
|
||||||
/**
|
/**
|
||||||
* Matrix.
|
* Matrix.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $matrix = [];
|
protected array $matrix = [];
|
||||||
|
|
@ -37,7 +37,7 @@ class Matrix implements \ArrayAccess, \Iterator
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $n = 0;
|
protected int $n = 0;
|
||||||
|
|
@ -45,7 +45,7 @@ class Matrix implements \ArrayAccess, \Iterator
|
||||||
/**
|
/**
|
||||||
* Rows.
|
* Rows.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $m = 0;
|
protected int $m = 0;
|
||||||
|
|
@ -53,7 +53,7 @@ class Matrix implements \ArrayAccess, \Iterator
|
||||||
/**
|
/**
|
||||||
* Iterator position.
|
* Iterator position.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $position = 0;
|
protected int $position = 0;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ final class QRDecomposition
|
||||||
/**
|
/**
|
||||||
* QR matrix.
|
* QR matrix.
|
||||||
*
|
*
|
||||||
* @var array[]
|
* @var array[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $QR = [];
|
private array $QR = [];
|
||||||
|
|
@ -40,7 +40,7 @@ final class QRDecomposition
|
||||||
/**
|
/**
|
||||||
* Dimension m
|
* Dimension m
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $m = 0;
|
private int $m = 0;
|
||||||
|
|
@ -48,7 +48,7 @@ final class QRDecomposition
|
||||||
/**
|
/**
|
||||||
* Dimension n
|
* Dimension n
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private int $n = 0;
|
private int $n = 0;
|
||||||
|
|
@ -56,7 +56,7 @@ final class QRDecomposition
|
||||||
/**
|
/**
|
||||||
* R diagonal
|
* R diagonal
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $Rdiag = [];
|
private array $Rdiag = [];
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class Complex
|
||||||
/**
|
/**
|
||||||
* Real part.
|
* Real part.
|
||||||
*
|
*
|
||||||
* @var int|float
|
* @var int|float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $re;
|
private $re;
|
||||||
|
|
@ -35,7 +35,7 @@ final class Complex
|
||||||
/**
|
/**
|
||||||
* Imaginary part.
|
* Imaginary part.
|
||||||
*
|
*
|
||||||
* @var int|float
|
* @var int|float
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $im;
|
private $im;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ final class CubicSplineInterpolation implements InterpolationInterface
|
||||||
/**
|
/**
|
||||||
* Points for spline interpolation
|
* Points for spline interpolation
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $points = [];
|
private array $points = [];
|
||||||
|
|
@ -38,7 +38,7 @@ final class CubicSplineInterpolation implements InterpolationInterface
|
||||||
/**
|
/**
|
||||||
* Parameter a of cubic spline
|
* Parameter a of cubic spline
|
||||||
*
|
*
|
||||||
* @var Vector
|
* @var Vector
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private Vector $solveA;
|
private Vector $solveA;
|
||||||
|
|
@ -46,7 +46,7 @@ final class CubicSplineInterpolation implements InterpolationInterface
|
||||||
/**
|
/**
|
||||||
* Parameter b of cubic spline
|
* Parameter b of cubic spline
|
||||||
*
|
*
|
||||||
* @var Matrix
|
* @var Matrix
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private Matrix $solveB;
|
private Matrix $solveB;
|
||||||
|
|
@ -54,7 +54,7 @@ final class CubicSplineInterpolation implements InterpolationInterface
|
||||||
/**
|
/**
|
||||||
* Parameter c of cubic spline
|
* Parameter c of cubic spline
|
||||||
*
|
*
|
||||||
* @var Vector
|
* @var Vector
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private Vector $solveC;
|
private Vector $solveC;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class LagrangeInterpolation implements InterpolationInterface
|
||||||
/**
|
/**
|
||||||
* Points for spline interpolation
|
* Points for spline interpolation
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $points = [];
|
private array $points = [];
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ final class LinearInterpolation implements InterpolationInterface
|
||||||
/**
|
/**
|
||||||
* Points for spline interpolation
|
* Points for spline interpolation
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $points = [];
|
private array $points = [];
|
||||||
|
|
@ -37,7 +37,7 @@ final class LinearInterpolation implements InterpolationInterface
|
||||||
/**
|
/**
|
||||||
* Parameter a of cubic spline
|
* Parameter a of cubic spline
|
||||||
*
|
*
|
||||||
* @var Vector
|
* @var Vector
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private Vector $solveA;
|
private Vector $solveA;
|
||||||
|
|
@ -45,7 +45,7 @@ final class LinearInterpolation implements InterpolationInterface
|
||||||
/**
|
/**
|
||||||
* Parameter b of cubic spline
|
* Parameter b of cubic spline
|
||||||
*
|
*
|
||||||
* @var Vector
|
* @var Vector
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private Vector $solveB;
|
private Vector $solveB;
|
||||||
|
|
@ -53,7 +53,7 @@ final class LinearInterpolation implements InterpolationInterface
|
||||||
/**
|
/**
|
||||||
* Parameter c of cubic spline
|
* Parameter c of cubic spline
|
||||||
*
|
*
|
||||||
* @var Vector
|
* @var Vector
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private Vector $solveC;
|
private Vector $solveC;
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpOMS\Math\Statistic\Forecast\Regression;
|
namespace phpOMS\Math\Statistic\Forecast\Regression;
|
||||||
|
|
||||||
use phpOMS\Math\Statistic\Average;
|
|
||||||
use phpOMS\Math\Matrix\Exception\InvalidDimensionException;
|
use phpOMS\Math\Matrix\Exception\InvalidDimensionException;
|
||||||
|
use phpOMS\Math\Statistic\Average;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regression class.
|
* Regression class.
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ final class ChiSquaredDistribution
|
||||||
/**
|
/**
|
||||||
* Chi square table.
|
* Chi square table.
|
||||||
*
|
*
|
||||||
* @var array<int, array<string, float>>
|
* @var array<int, array<string, float>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const TABLE = [
|
public const TABLE = [
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ final class LogNormalDistribution
|
||||||
*/
|
*/
|
||||||
public static function getEntrpoy(float $mu, float $sigma) : float
|
public static function getEntrpoy(float $mu, float $sigma) : float
|
||||||
{
|
{
|
||||||
return \log($sigma * \exp($mu + 1 / 2) * \sqrt(2 * M_1_PI), 2);
|
return \log($sigma * \exp($mu + 1 / 2) * \sqrt(2 * \M_1_PI), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ final class NormalDistribution
|
||||||
*
|
*
|
||||||
* Z-Score.
|
* Z-Score.
|
||||||
*
|
*
|
||||||
* @var array<string, float>
|
* @var array<string, float>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const TABLE = [
|
public const TABLE = [
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ final class ParetoDistribution
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
[$alpha / $xm ** 2, -1 / $xm],
|
[$alpha / $xm ** 2, -1 / $xm],
|
||||||
[-1 / $xm, 1 / ($alpha ** 2)]
|
[-1 / $xm, 1 / ($alpha ** 2)],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ final class TDistribution
|
||||||
*
|
*
|
||||||
* [degrees of freedom = df]
|
* [degrees of freedom = df]
|
||||||
*
|
*
|
||||||
* @var array<int, array<string, float>>
|
* @var array<int, array<string, float>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const TABLE = [
|
public const TABLE = [
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ namespace phpOMS\Math\Stochastic\Distribution;
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
*/
|
*/
|
||||||
final class ZTest
|
final class ZTest
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ final class NaiveBayesClassifier
|
||||||
/**
|
/**
|
||||||
* Dictionary of different criterias.
|
* Dictionary of different criterias.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $dict = [];
|
private array $dict = [];
|
||||||
|
|
@ -37,7 +37,7 @@ final class NaiveBayesClassifier
|
||||||
/**
|
/**
|
||||||
* Dictionary changed.
|
* Dictionary changed.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private bool $changed = true;
|
private bool $changed = true;
|
||||||
|
|
@ -45,7 +45,7 @@ final class NaiveBayesClassifier
|
||||||
/**
|
/**
|
||||||
* Cached probabilities.
|
* Cached probabilities.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $probabilities = [
|
private array $probabilities = [
|
||||||
|
|
@ -193,7 +193,7 @@ final class NaiveBayesClassifier
|
||||||
* \exp(-($toMatch[$attr] - $this->probabilities['criteria'][$criteria]['attr'][$attr]['mean']) ** 2 / (2 * $this->probabilities['criteria'][$criteria]['attr'][$attr]['variance'])))
|
* \exp(-($toMatch[$attr] - $this->probabilities['criteria'][$criteria]['attr'][$attr]['mean']) ** 2 / (2 * $this->probabilities['criteria'][$criteria]['attr'][$attr]['variance'])))
|
||||||
* ($this->probabilities['criteria'][$criteria]['count'] / $this->probabilities['count']);
|
* ($this->probabilities['criteria'][$criteria]['count'] / $this->probabilities['count']);
|
||||||
} else {
|
} else {
|
||||||
if (!isset( $this->probabilities['attr'][$attr])) {
|
if (!isset($this->probabilities['attr'][$attr])) {
|
||||||
$this->probabilities['attr'][$attr] = ['data' => []];
|
$this->probabilities['attr'][$attr] = ['data' => []];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ final class Metrics2D
|
||||||
*
|
*
|
||||||
* @param array<string, int|float> $a 2-D array with x and y coordinate
|
* @param array<string, int|float> $a 2-D array with x and y coordinate
|
||||||
* @param array<string, int|float> $b 2-D array with x and y coordinate
|
* @param array<string, int|float> $b 2-D array with x and y coordinate
|
||||||
* @param int $lambda Lambda
|
* @param int $lambda Lambda
|
||||||
*
|
*
|
||||||
* @return float
|
* @return float
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ final class MetricsND
|
||||||
*
|
*
|
||||||
* @param array<int|string, int|float> $a n-D array
|
* @param array<int|string, int|float> $a n-D array
|
||||||
* @param array<int|string, int|float> $b n-D array
|
* @param array<int|string, int|float> $b n-D array
|
||||||
* @param int $lambda Lambda
|
* @param int $lambda Lambda
|
||||||
*
|
*
|
||||||
* @return float
|
* @return float
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ final class Header extends HeaderAbstract
|
||||||
/**
|
/**
|
||||||
* Protocol version.
|
* Protocol version.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private const VERSION = '1.0';
|
private const VERSION = '1.0';
|
||||||
|
|
@ -39,7 +39,7 @@ final class Header extends HeaderAbstract
|
||||||
/**
|
/**
|
||||||
* Header.
|
* Header.
|
||||||
*
|
*
|
||||||
* @var string[][]
|
* @var string[][]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $header = [];
|
private array $header = [];
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ final class Request extends RequestAbstract
|
||||||
/**
|
/**
|
||||||
* Uri.
|
* Uri.
|
||||||
*
|
*
|
||||||
* @var UriInterface
|
* @var UriInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected UriInterface $uri;
|
protected UriInterface $uri;
|
||||||
|
|
@ -44,7 +44,7 @@ final class Request extends RequestAbstract
|
||||||
/**
|
/**
|
||||||
* Request method.
|
* Request method.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $method;
|
protected string $method;
|
||||||
|
|
@ -52,7 +52,7 @@ final class Request extends RequestAbstract
|
||||||
/**
|
/**
|
||||||
* Request hash.
|
* Request hash.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $hash = [];
|
protected array $hash = [];
|
||||||
|
|
@ -60,7 +60,7 @@ final class Request extends RequestAbstract
|
||||||
/**
|
/**
|
||||||
* OS type.
|
* OS type.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $os;
|
private string $os;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ final class Response extends ResponseAbstract implements RenderableInterface
|
||||||
/**
|
/**
|
||||||
* Response status.
|
* Response status.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $status = RequestStatusCode::R_200;
|
protected int $status = RequestStatusCode::R_200;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ abstract class HeaderAbstract
|
||||||
/**
|
/**
|
||||||
* Responses.
|
* Responses.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected bool $isLocked = false;
|
protected bool $isLocked = false;
|
||||||
|
|
@ -37,7 +37,7 @@ abstract class HeaderAbstract
|
||||||
/**
|
/**
|
||||||
* Localization.
|
* Localization.
|
||||||
*
|
*
|
||||||
* @var Localization
|
* @var Localization
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected Localization $l11n;
|
protected Localization $l11n;
|
||||||
|
|
@ -45,7 +45,7 @@ abstract class HeaderAbstract
|
||||||
/**
|
/**
|
||||||
* Account.
|
* Account.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $account = 0;
|
protected int $account = 0;
|
||||||
|
|
@ -53,7 +53,7 @@ abstract class HeaderAbstract
|
||||||
/**
|
/**
|
||||||
* Response status.
|
* Response status.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $status = 0;
|
protected int $status = 0;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ final class Header extends HeaderAbstract
|
||||||
/**
|
/**
|
||||||
* Header.
|
* Header.
|
||||||
*
|
*
|
||||||
* @var string[][]
|
* @var string[][]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $header = [];
|
private array $header = [];
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ final class Request extends RequestAbstract
|
||||||
/**
|
/**
|
||||||
* Request method.
|
* Request method.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $method;
|
protected string $method;
|
||||||
|
|
@ -44,7 +44,7 @@ final class Request extends RequestAbstract
|
||||||
/**
|
/**
|
||||||
* Browser type.
|
* Browser type.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $browser;
|
private string $browser;
|
||||||
|
|
@ -52,7 +52,7 @@ final class Request extends RequestAbstract
|
||||||
/**
|
/**
|
||||||
* OS type.
|
* OS type.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $os;
|
private string $os;
|
||||||
|
|
@ -60,7 +60,7 @@ final class Request extends RequestAbstract
|
||||||
/**
|
/**
|
||||||
* Request information.
|
* Request information.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $info;
|
private array $info;
|
||||||
|
|
@ -68,7 +68,7 @@ final class Request extends RequestAbstract
|
||||||
/**
|
/**
|
||||||
* Request hash.
|
* Request hash.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $hash = [];
|
protected array $hash = [];
|
||||||
|
|
@ -76,7 +76,7 @@ final class Request extends RequestAbstract
|
||||||
/**
|
/**
|
||||||
* Uploaded files.
|
* Uploaded files.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $files;
|
protected array $files;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class EmailAbstract
|
||||||
/**
|
/**
|
||||||
* Host.
|
* Host.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $host = '';
|
protected $host = '';
|
||||||
|
|
@ -38,7 +38,7 @@ class EmailAbstract
|
||||||
/**
|
/**
|
||||||
* Port.
|
* Port.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $port = 25;
|
protected $port = 25;
|
||||||
|
|
@ -46,7 +46,7 @@ class EmailAbstract
|
||||||
/**
|
/**
|
||||||
* Use ssl.
|
* Use ssl.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $ssl = false;
|
protected $ssl = false;
|
||||||
|
|
@ -54,7 +54,7 @@ class EmailAbstract
|
||||||
/**
|
/**
|
||||||
* Mailbox base.
|
* Mailbox base.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $mailbox = '';
|
protected $mailbox = '';
|
||||||
|
|
@ -62,7 +62,7 @@ class EmailAbstract
|
||||||
/**
|
/**
|
||||||
* Timeout.
|
* Timeout.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $timeout = 30;
|
protected $timeout = 30;
|
||||||
|
|
@ -70,7 +70,7 @@ class EmailAbstract
|
||||||
/**
|
/**
|
||||||
* Connection.
|
* Connection.
|
||||||
*
|
*
|
||||||
* @var mixed
|
* @var mixed
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $con = null;
|
protected $con = null;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail from.
|
* Mail from.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $from = '';
|
protected $from = '';
|
||||||
|
|
@ -35,7 +35,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail to.
|
* Mail to.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $to = [];
|
protected $to = [];
|
||||||
|
|
@ -43,7 +43,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail subject.
|
* Mail subject.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $subject = '';
|
protected $subject = '';
|
||||||
|
|
@ -51,7 +51,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail cc.
|
* Mail cc.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $cc = [];
|
protected $cc = [];
|
||||||
|
|
@ -59,7 +59,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail reply to.
|
* Mail reply to.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $replyTo = [];
|
protected $replyTo = [];
|
||||||
|
|
@ -67,7 +67,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail bcc.
|
* Mail bcc.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $bcc = [];
|
protected $bcc = [];
|
||||||
|
|
@ -75,7 +75,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail attachments.
|
* Mail attachments.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $attachment = [];
|
protected $attachment = [];
|
||||||
|
|
@ -83,7 +83,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail body.
|
* Mail body.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $body = '';
|
protected $body = '';
|
||||||
|
|
@ -91,7 +91,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail overview.
|
* Mail overview.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $overview = '';
|
protected $overview = '';
|
||||||
|
|
@ -99,7 +99,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail alt.
|
* Mail alt.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $bodyAlt = '';
|
protected $bodyAlt = '';
|
||||||
|
|
@ -107,7 +107,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail mime.
|
* Mail mime.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $bodyMime = '';
|
protected $bodyMime = '';
|
||||||
|
|
@ -115,7 +115,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail header.
|
* Mail header.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $headerMail = '';
|
protected $headerMail = '';
|
||||||
|
|
@ -123,7 +123,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Word wrap.
|
* Word wrap.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $wordWrap = 78;
|
protected $wordWrap = 78;
|
||||||
|
|
@ -131,7 +131,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Encoding.
|
* Encoding.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $encoding = 0;
|
protected $encoding = 0;
|
||||||
|
|
@ -139,7 +139,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail host name.
|
* Mail host name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $hostname = '';
|
protected $hostname = '';
|
||||||
|
|
@ -147,7 +147,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail id.
|
* Mail id.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $messageId = '';
|
protected $messageId = '';
|
||||||
|
|
@ -155,7 +155,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail message type.
|
* Mail message type.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $messageType = '';
|
protected $messageType = '';
|
||||||
|
|
@ -163,7 +163,7 @@ class Mail
|
||||||
/**
|
/**
|
||||||
* Mail from.
|
* Mail from.
|
||||||
*
|
*
|
||||||
* @var null|\DateTime
|
* @var null|\DateTime
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $messageDate = null;
|
protected $messageDate = null;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ abstract class RequestAbstract implements MessageInterface
|
||||||
/**
|
/**
|
||||||
* Uri.
|
* Uri.
|
||||||
*
|
*
|
||||||
* @var UriInterface
|
* @var UriInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected UriInterface $uri;
|
protected UriInterface $uri;
|
||||||
|
|
@ -37,7 +37,7 @@ abstract class RequestAbstract implements MessageInterface
|
||||||
/**
|
/**
|
||||||
* Request data.
|
* Request data.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $data = [];
|
protected array $data = [];
|
||||||
|
|
@ -45,7 +45,7 @@ abstract class RequestAbstract implements MessageInterface
|
||||||
/**
|
/**
|
||||||
* Request lock.
|
* Request lock.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected bool $lock = false;
|
protected bool $lock = false;
|
||||||
|
|
@ -53,7 +53,7 @@ abstract class RequestAbstract implements MessageInterface
|
||||||
/**
|
/**
|
||||||
* Request header.
|
* Request header.
|
||||||
*
|
*
|
||||||
* @var HeaderAbstract
|
* @var HeaderAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected HeaderAbstract $header;
|
protected HeaderAbstract $header;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ abstract class ResponseAbstract implements MessageInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Responses.
|
* Responses.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected array $response = [];
|
protected array $response = [];
|
||||||
|
|
@ -35,7 +35,7 @@ abstract class ResponseAbstract implements MessageInterface, \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* Header.
|
* Header.
|
||||||
*
|
*
|
||||||
* @var HeaderAbstract
|
* @var HeaderAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected HeaderAbstract $header;
|
protected HeaderAbstract $header;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class Header extends HeaderAbstract implements \Serializable
|
||||||
/**
|
/**
|
||||||
* Packet size.
|
* Packet size.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $length = 0;
|
private $length = 0;
|
||||||
|
|
@ -43,7 +43,7 @@ class Header extends HeaderAbstract implements \Serializable
|
||||||
/**
|
/**
|
||||||
* Packet type.
|
* Packet type.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $type = 0;
|
private $type = 0;
|
||||||
|
|
@ -51,7 +51,7 @@ class Header extends HeaderAbstract implements \Serializable
|
||||||
/**
|
/**
|
||||||
* Packet subtype.
|
* Packet subtype.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $subtype = 0;
|
private $subtype = 0;
|
||||||
|
|
@ -59,7 +59,7 @@ class Header extends HeaderAbstract implements \Serializable
|
||||||
/**
|
/**
|
||||||
* Header.
|
* Header.
|
||||||
*
|
*
|
||||||
* @var string[][]
|
* @var string[][]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $header = [];
|
private array $header = [];
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,8 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpOMS\Message\Socket;
|
namespace phpOMS\Message\Socket;
|
||||||
|
|
||||||
use phpOMS\Socket\Server\ClientManager;
|
|
||||||
use phpOMS\Dispatcher\Dispatcher;
|
use phpOMS\Dispatcher\Dispatcher;
|
||||||
use phpOMS\Router\SocketRouter;
|
use phpOMS\Router\SocketRouter;
|
||||||
use phpOMS\Message\Socket\Request;
|
|
||||||
use phpOMS\Message\Socket\Response;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Server class.
|
* Server class.
|
||||||
|
|
@ -35,7 +32,7 @@ class PacketManager
|
||||||
/**
|
/**
|
||||||
* Socket router.
|
* Socket router.
|
||||||
*
|
*
|
||||||
* @var SocketRouter
|
* @var SocketRouter
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private SocketRouter $router;
|
private SocketRouter $router;
|
||||||
|
|
@ -43,7 +40,7 @@ class PacketManager
|
||||||
/**
|
/**
|
||||||
* Dispatcher.
|
* Dispatcher.
|
||||||
*
|
*
|
||||||
* @var Dispatcher
|
* @var Dispatcher
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private Dispatcher $dispatcher;
|
private Dispatcher $dispatcher;
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpOMS\Message\Socket;
|
namespace phpOMS\Message\Socket;
|
||||||
|
|
||||||
use phpOMS\Message\ResponseAbstract;
|
|
||||||
use phpOMS\Contract\RenderableInterface;
|
use phpOMS\Contract\RenderableInterface;
|
||||||
|
use phpOMS\Message\ResponseAbstract;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response class.
|
* Response class.
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class FormElement
|
||||||
/**
|
/**
|
||||||
* Element id.
|
* Element id.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $id;
|
public string $id;
|
||||||
|
|
@ -35,7 +35,7 @@ class FormElement
|
||||||
/**
|
/**
|
||||||
* Form id.
|
* Form id.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $form;
|
public string $form;
|
||||||
|
|
@ -43,7 +43,7 @@ class FormElement
|
||||||
/**
|
/**
|
||||||
* Element name.
|
* Element name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $name;
|
public string $name;
|
||||||
|
|
@ -51,7 +51,7 @@ class FormElement
|
||||||
/**
|
/**
|
||||||
* Value is required.
|
* Value is required.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public bool $required;
|
public bool $required;
|
||||||
|
|
@ -59,7 +59,7 @@ class FormElement
|
||||||
/**
|
/**
|
||||||
* Default value.
|
* Default value.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $defaultValue;
|
public string $defaultValue;
|
||||||
|
|
@ -67,7 +67,7 @@ class FormElement
|
||||||
/**
|
/**
|
||||||
* Required values which cannot be changed/removed.
|
* Required values which cannot be changed/removed.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public string $requiredValue;
|
public string $requiredValue;
|
||||||
|
|
@ -75,7 +75,7 @@ class FormElement
|
||||||
/**
|
/**
|
||||||
* Autosave on change.
|
* Autosave on change.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public bool $autosave;
|
public bool $autosave;
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user