src/AssetManager/Service/AssetFilterManager.php
protected function ensureByService(AssetInterface $asset, $service)
    {
        if (is_string($service)) {
            $this->ensureByFilter($asset, $this->getServiceLocator()->get($service));
        } else {
            throw new Exception\RuntimeException(
                'Unexpected service provided. Expected string or callback.'
            );
        }
    }
protected function ensureByService(AssetInterface $asset, $service)
    {
        if (is_string($service)) {
            $this->ensureByFilter($asset, $this->getServiceLocator()->get($service));
        } else {
            throw new Exception\RuntimeException(
                'Unexpected service provided. Expected string or callback.'
            );
        }
    }
protected function ensureByService ( AssetInterface $ asset , $ service ) { if ( is_string ( $ service ) ) { $ this -> ensureByFilter ( $ asset , $ this -> getServiceLocator ( ) -> get ( $ service ) ) ; } else { throw new Exception \ RuntimeException ( 'Unexpected service provided. Expected string or callback.' ) ; } }
Ensure that the filters as service are set.

@param   AssetInterface  $asset
@param   string          $service    A valid service name.
@throws  Exception\RuntimeException
Ensure that the filters as service are set .