Here is a dump of a new instance of my entity Theme
, when using $this->type = 'theme';
in the __construct
function.
ExplorerController.php on line 197:
Theme {#450 ▼
-id: null
-headings: ArrayCollection {#449 ▶}
-infos: null
-base: null
-deletedAt: null
-key: null
-description: null
-type: null
+"type": "theme"
}
I don't understand why the last field type appears twice, first with a null
value, and then between quotes with a "plus" sign in front.
If I use the setter $this->setType('theme');
then the result is as expected:
ExplorerController.php on line 197:
Theme {#450 ▼
-id: null
-headings: ArrayCollection {#449 ▶}
-infos: null
-base: null
-deletedAt: null
-key: null
-description: null
-type: "theme"
}
I guess it has to do with proxies, but this a subject I don't fully understand.
Could someone explain what's happening here?