public function setLayers(array $layers)
    {
        $this->layers = array_values(array_filter($layers, function ($layer): bool {
            return $layer instanceof Layer;
        }));
        return $this;
    }