public function filterByCookie(string $cookie = null) | public function filterByCookie(string $cookie = null) | ||||
{ | { | ||||
return $this | |||||
if(is_null($cookie)) { | |||||
return $this->andWhere('.cookie IS NULL'); | |||||
} | |||||
else { | |||||
return $this | |||||
->andWhere('.cookie LIKE :cookie') | ->andWhere('.cookie LIKE :cookie') | ||||
->setParameter('cookie', $cookie); | ->setParameter('cookie', $cookie); | ||||
} | |||||
} | } | ||||
public function filterByLastAccess(\DateTime $lastAccess) | public function filterByLastAccess(\DateTime $lastAccess) |