Compare commits
3 Commits
1.1.0
...
1ad13ddd3f
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ad13ddd3f | |||
| 14c2629fb3 | |||
| a5a79f2143 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
vendor
|
||||
composer.lock
|
||||
|
||||
97
composer.lock
generated
97
composer.lock
generated
@@ -1,97 +0,0 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "0c82d08a56b9613dcd0f25c1e08ce433",
|
||||
"packages": [
|
||||
{
|
||||
"name": "mirzaev/baza",
|
||||
"version": "3.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.svoboda.works/mirzaev/baza",
|
||||
"reference": "ec2721dc7727ebcd43b780892f3df6831dfff06b"
|
||||
},
|
||||
"require": {
|
||||
"php": "^8.4"
|
||||
},
|
||||
"type": "database",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"mirzaev\\baza\\": "mirzaev/baza/system/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"WTFPL"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arsen Mirzaev Tatyano-Muradovich",
|
||||
"email": "arsen@mirzaev.sexy",
|
||||
"homepage": "https://mirzaev.sexy",
|
||||
"role": "Programmer"
|
||||
}
|
||||
],
|
||||
"description": "Lightweight binary database by pure PHP",
|
||||
"homepage": "https://git.svoboda.works/mirzaev/baza",
|
||||
"keywords": [
|
||||
"Plain",
|
||||
"binary",
|
||||
"lightweight"
|
||||
],
|
||||
"support": {
|
||||
"email": "arsen@mirzaev.sexy",
|
||||
"issues": "https://git.svoboda.works/mirzaev/baza/issues",
|
||||
"wiki": "https://git.svoboda.works/mirzaev/baza/wiki"
|
||||
},
|
||||
"time": "2025-08-08T14:27:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "svoboda/time",
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.svoboda.works/svoboda/time",
|
||||
"reference": "0764960606d56a9f0865ebb07671d30a7d232b6a"
|
||||
},
|
||||
"require": {
|
||||
"php": "^8.4"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"svoboda\\time\\": "svoboda/time/system"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"WTFPL"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arsen Mirzaev Tatyano-Muradovich",
|
||||
"email": "arsen@mirzaev.sexy",
|
||||
"homepage": "https://mirzaev.sexy",
|
||||
"role": "Programmer"
|
||||
}
|
||||
],
|
||||
"description": "Time since Svoboda was created",
|
||||
"homepage": "https://git.svoboda.works/svoboda/time",
|
||||
"time": "2025-02-02T11:04:25+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "^8.4"
|
||||
},
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
||||
@@ -4,6 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace mirzaev\record\interfaces;
|
||||
|
||||
// Baza database
|
||||
use mirzaev\baza\record as baza;
|
||||
|
||||
// Built-in libraries
|
||||
use InvalidArgumentException as exception_invalid_argument;
|
||||
|
||||
@@ -16,6 +19,7 @@ use InvalidArgumentException as exception_invalid_argument;
|
||||
*
|
||||
* @package mirzaev\record\interfaces
|
||||
*
|
||||
* @method void __construct(record|null $record) Constructor
|
||||
* @method static|false read(callable $filter) Read from the database
|
||||
* @method static|false update() Update the record in the database
|
||||
*
|
||||
@@ -31,7 +35,7 @@ interface record
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct();
|
||||
public function __construct(?baza $record = null);
|
||||
|
||||
/**
|
||||
* Read
|
||||
|
||||
@@ -11,7 +11,6 @@ use svoboda\time\statement as svoboda;
|
||||
use mirzaev\baza\database,
|
||||
mirzaev\baza\column,
|
||||
mirzaev\baza\record as baza,
|
||||
mirzaev\baza\enumerations\encoding,
|
||||
mirzaev\baza\enumerations\type;
|
||||
|
||||
// Built-in libraries
|
||||
@@ -48,6 +47,29 @@ trait record
|
||||
*/
|
||||
protected baza $record;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @method record|null $record The record
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(?record $record = null)
|
||||
{
|
||||
// Initializing the database
|
||||
/* $this->database = new database()
|
||||
->encoding(encoding::utf8)
|
||||
->columns(
|
||||
new column('identifier', type::long_long_unsigned),
|
||||
new column('updated', type::integer_unsigned),
|
||||
new column('created', type::integer_unsigned)
|
||||
)
|
||||
->connect($this->file); */
|
||||
|
||||
// Initializing the record
|
||||
$record instanceof record and $this->record = $record;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user