src/Service/AssetFilterManager.php
protected function setFilter($filter, AssetInterface $asset)
    {
        if (is_null($filter)) {
            return;
        }

        if (!empty($filter['filter'])) {
            $this->ensureByFilter($asset, $filter['filter']);

            return;
        }

        if (!empty($filter['service'])) {
            $this->ensureByService($asset, $filter['service']);

            return;
        }

        throw new Exception\RuntimeException(
            'Invalid filter supplied. Expected Filter or Service.'
        );
    }
protected function setFilter($filter, AssetInterface $asset)
    {
        if (is_null($filter)) {
            return;
        }

        if (!empty($filter['filter'])) {
            $this->ensureByFilter($asset, $filter['filter']);

            return;
        }

        if (!empty($filter['service'])) {
            $this->ensureByService($asset, $filter['service']);

            return;
        }

        throw new Exception\RuntimeException(
            'Invalid filter supplied. Expected Filter or Service.'
        );
    }
protected function setFilter ( $ filter , AssetInterface $ asset ) { if ( is_null ( $ filter ) ) { return ; } if ( ! empty ( $ filter [ 'filter' ] ) ) { $ this -> ensureByFilter ( $ asset , $ filter [ 'filter' ] ) ; return ; } if ( ! empty ( $ filter [ 'service' ] ) ) { $ this -> ensureByService ( $ asset , $ filter [ 'service' ] ) ; return ; } throw new Exception \ RuntimeException ( 'Invalid filter supplied. Expected Filter or Service.' ) ; }
Set the filter by filter or service

@param string         $filter
@param AssetInterface $asset
Set the filter by filter or service