Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 82582719b2 | |||
| 22fe7f894f |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
vendor
|
||||
composer.lock
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
"require": {
|
||||
"php": "^8.4"
|
||||
},
|
||||
"suggest": {
|
||||
"mirzaev/record": "Active Record pattern"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"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
|
||||
{
|
||||
if (isset($this->values[$name])) {
|
||||
// Initialized the parameter
|
||||
if (property_exists(static, $name)) {
|
||||
// Exist the property
|
||||
|
||||
// Writing the value and exit
|
||||
$this->values[$name] = $value;
|
||||
} else {
|
||||
// Not initialized the parameter
|
||||
// Not exist the property
|
||||
|
||||
// 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