Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
29 lines (23 sloc) 591 Bytes
<?php
namespace Doctrine\Bundle\DoctrineBundle\Dbal;
use Doctrine\DBAL\Schema\AbstractAsset;
use function in_array;
class BlacklistSchemaAssetFilter
{
/** @var string[] */
private $blacklist;
/**
* @param string[] $blacklist
*/
public function __construct(array $blacklist)
{
$this->blacklist = $blacklist;
}
public function __invoke($assetName) : bool
{
if ($assetName instanceof AbstractAsset) {
$assetName = $assetName->getName();
}
return ! in_array($assetName, $this->blacklist, true);
}
}
You can’t perform that action at this time.