Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 90948b633f | |||
| 82582719b2 | |||
| 22fe7f894f |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
vendor
|
vendor
|
||||||
|
composer.lock
|
||||||
|
|||||||
@@ -27,6 +27,9 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": "^8.4"
|
"php": "^8.4"
|
||||||
},
|
},
|
||||||
|
"suggest": {
|
||||||
|
"mirzaev/record": "Active Record pattern"
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"mirzaev\\baza\\": "mirzaev/baza/system/"
|
"mirzaev\\baza\\": "mirzaev/baza/system/"
|
||||||
|
|||||||
20
composer.lock
generated
20
composer.lock
generated
@@ -1,20 +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": "a83cda6b5d1de267690c8b7e2a2ddf86",
|
|
||||||
"packages": [],
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
@@ -72,16 +72,16 @@ class record
|
|||||||
*/
|
*/
|
||||||
public function __set(string $name, mixed $value = null): void
|
public function __set(string $name, mixed $value = null): void
|
||||||
{
|
{
|
||||||
if (isset($this->values[$name])) {
|
if (array_key_exists($name, $this->values)) {
|
||||||
// Initialized the parameter
|
// Exist the property
|
||||||
|
|
||||||
// Writing the value and exit
|
// Writing the value and exit
|
||||||
$this->values[$name] = $value;
|
$this->values[$name] = $value;
|
||||||
} else {
|
} else {
|
||||||
// Not initialized the parameter
|
// Not exist the property
|
||||||
|
|
||||||
// Exit (fail)
|
// Exit (fail)
|
||||||
throw new exception_domain("Not found the parameter: $name");
|
throw new exception_domain("Not found the property: $name");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user