private function setResources($resources)
    {
        if (!$resources instanceof ResourcesInterface) {
            $files = (array)$resources;
            $resources = new Resources;

            array_walk($files, [$resources, 'addFileResource']);
        }

        $this->resources = $resources;
    }