We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aed7065 commit d5d1135Copy full SHA for d5d1135
lib/Skeleton/Object/Model.php
@@ -70,7 +70,7 @@ trait Model {
70
public function __construct($id = null) {
71
if (property_exists(__CLASS__, 'class_configuration') && isset(self::$class_configuration['child_classname_field'])) {
72
$classname_field = self::$class_configuration['child_classname_field'];
73
- $this->details[$classname_field] = __CLASS__;
+ $this->details[$classname_field] = get_class($this);
74
}
75
76
if ($id !== null) {
@@ -94,7 +94,7 @@ public function cast($classname) {
94
throw new \Exception('Classname "' . $classname . '" doesn\'t exist');
95
96
97
- if (__CLASS__ == $classname) {
+ if (get_class($this) == $classname) {
98
return $this;
99
100
0 commit comments