Newscoop\Service\Implementation\SyncResourceServiceDoctrine::clearAllFor PHP Method

clearAllFor() public method

public clearAllFor ( $path )
    function clearAllFor($path)
    {
        Validation::notEmpty($path, 'path');
        $em = $this->getManager();
        $q = $em->createQueryBuilder();
        $q->delete(Resource::NAME, 'rsc')->where('rsc.path like :path');
        $q->setParameter('path', $path . '%');
        $q->getQuery()->execute();
    }