$request =
$args->
get('request'
);
// Only use Server Push if it is enabled in the settings and the current module is "frontend"
if (!
$this->pushEnabled
||
$request->
getModuleName() !== 'frontend'
) { return;
} /** @var Enlight_Controller_Response_Response $response */
$response =
$args->
get('response'
);
$linkProvider =
$this->webLinkManager->
getLinkProvider();
if (!
$linkProvider instanceof LinkProviderInterface
) { return;
} $links =
$linkProvider->
getLinks();
if (is_countable($links) && \
count($links) === 0
) { return;
} if ($links instanceof Traversable &&
iterator_count($links) === 0
) { return;
}