<?php

use FiloBlu\Refilo\Remote\Entity\Provider\ProductAttributeProvider;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Framework\App\Bootstrap;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\App\State;
use Magento\Store\Model\StoreManagerInterface;

require __DIR__ . '/../../../../../app/bootstrap.php';
$params = $_SERVER;
$bootstrap = Bootstrap::create(BP, $params);
$obj = $bootstrap->getObjectManager();
$state = $obj->get(State::class);
$state->setAreaCode(\Magento\Framework\App\Area::AREA_CRONTAB);
$objectManager = ObjectManager::getInstance();

/** @var StoreManagerInterface $storeManager */
$storeManager = $objectManager->create(StoreManagerInterface::class);

/** @var ProductAttributeProvider $attributeProvider */
$attributeProvider = $objectManager->create(ProductAttributeProvider::class);
$attributeProvider->forStore($storeManager->getStore(1));
$result  = iterator_to_array( $attributeProvider );

echo "Done\n";



/*
 *
 *

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$swatchHelper=$objectManager->get("Magento\Swatches\Helper\Media");
$swatchCollection = $objectManager->create('Magento\Swatches\Model\ResourceModel\Swatch\Collection');
// brand logo is my Visual Swatch attribute
$optionIdvalue = 53;
$swatchCollection->addFieldtoFilter('option_id',$optionIdvalue);
$item=$swatchCollection->getFirstItem();
echo $swatchHelper->getSwatchAttributeImage('swatch_thumb', $item->getValue());
echo $swatchHelper->getSwatchAttributeImage('swatch_image', $item->getValue());

 */
