Compare commits
1 Commits
1ad13ddd3f
...
2.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| beccbfee1e |
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
composer.json
Normal file → Executable file
0
composer.json
Normal file → Executable file
0
mirzaev/record/system/interfaces/record.php
Normal file → Executable file
0
mirzaev/record/system/interfaces/record.php
Normal file → Executable file
14
mirzaev/record/system/traits/record.php
Normal file → Executable file
14
mirzaev/record/system/traits/record.php
Normal file → Executable file
@@ -10,7 +10,7 @@ use svoboda\time\statement as svoboda;
|
||||
// Baza database
|
||||
use mirzaev\baza\database,
|
||||
mirzaev\baza\column,
|
||||
mirzaev\baza\record as baza,
|
||||
mirzaev\baza\record as baza_record,
|
||||
mirzaev\baza\enumerations\encoding,
|
||||
mirzaev\baza\enumerations\type;
|
||||
|
||||
@@ -44,9 +44,9 @@ trait record
|
||||
/**
|
||||
* Record
|
||||
*
|
||||
* @var baza $record The record instance
|
||||
* @var baza_record $record The record instance
|
||||
*/
|
||||
protected baza $record;
|
||||
protected baza_record $record;
|
||||
|
||||
/**
|
||||
* Read
|
||||
@@ -64,7 +64,7 @@ trait record
|
||||
offset: 0
|
||||
)[0] ?? false;
|
||||
|
||||
if ($record instanceof baza) {
|
||||
if ($record instanceof baza_record) {
|
||||
// Initialized the record
|
||||
|
||||
// Exit (success)
|
||||
@@ -86,8 +86,8 @@ trait record
|
||||
{
|
||||
// Writing into the database
|
||||
$record = $this->database->read(
|
||||
filter: fn(baza $record) => $record->identifier === $this->record->identifier,
|
||||
update: function (baza &$record) {
|
||||
filter: fn(baza_record $record) => $record->identifier === $this->record->identifier,
|
||||
update: function (baza_record &$record) {
|
||||
$this->record->updated = svoboda::timestamp();
|
||||
$record = $this->record;
|
||||
},
|
||||
@@ -95,7 +95,7 @@ trait record
|
||||
offset: 0
|
||||
)[0] ?? false;
|
||||
|
||||
if ($record instanceof record) {
|
||||
if ($record instanceof baza_record) {
|
||||
// Initialized the record
|
||||
|
||||
// Exit (success)
|
||||
|
||||
Reference in New Issue
Block a user