create-prisma-php-app 3.0.0-beta.6 → 3.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,6 +15,7 @@ use RuntimeException;
|
|
|
15
15
|
use Bootstrap;
|
|
16
16
|
use LibXMLError;
|
|
17
17
|
use DOMXPath;
|
|
18
|
+
use ReflectionClass;
|
|
18
19
|
|
|
19
20
|
class TemplateCompiler
|
|
20
21
|
{
|
|
@@ -473,9 +474,10 @@ class TemplateCompiler
|
|
|
473
474
|
}
|
|
474
475
|
|
|
475
476
|
$instance = new $className($attributes);
|
|
477
|
+
$ref = new ReflectionClass($instance);
|
|
476
478
|
|
|
477
479
|
foreach ($attributes as $key => $value) {
|
|
478
|
-
if (
|
|
480
|
+
if ($ref->hasProperty($key) && $ref->getProperty($key)->isPublic()) {
|
|
479
481
|
$instance->$key = $value;
|
|
480
482
|
}
|
|
481
483
|
}
|