Skip to content

Commit

Permalink
Добавил функцию set_decorator_prop
Browse files Browse the repository at this point in the history
  • Loading branch information
arutyunyan committed Apr 16, 2024
1 parent bb9d0f4 commit 01bb453
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"Sagittaracc\\PhpPythonDecorator\\": "src/",
"Sagittaracc\\PhpPythonDecorator\\tests\\": "tests/"
},
"files": ["src/helpers/names.php", "src/helpers/call.php"]
"files": ["src/helpers/names.php", "src/helpers/call.php", "src/helpers/set.php"]
},
"authors": [
{
Expand Down
7 changes: 7 additions & 0 deletions src/helpers/set.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

function set_decorator_prop($object, $prop, $value)
{
$prop = get_decor_name($prop);
$object->$prop = $value;
}

0 comments on commit 01bb453

Please sign in to comment.