public function getUrlIdMap(array $urls)
{
$map = array();
if (!empty($urls)) {
$q = $this->getConnection()->createSelectQuery();
$q->select('id', 'url')->from(self::URL_TABLE)->where($q->expr->in('url', $urls));
$statement = $q->prepare();
$statement->execute();
foreach ($statement->fetchAll(PDO::FETCH_ASSOC) as $row) {
$map[$row['url']] = $row['id'];
}
}
return $map;
}