setName(['fr' => $name, 'en' => $name]); $reflection = new \ReflectionClass($scope); $idProperty = $reflection->getProperty('id'); $idProperty->setAccessible(true); $idProperty->setValue($scope, $id); return $scope; } }