public function _clean($pMax)
    {
        Agl::validateParams(array(
            'Digit' => $pMax
        ));

        $old = time() - $pMax;

        $collection = new Collection(self::DB_COLLECTION);

        $conditions = new Conditions();
        $conditions->add('access', Conditions::LT, $old);

        $collection->load($conditions);
        $collection->deleteItems();

        return true;
    }
public function _clean($pMax)
    {
        Agl::validateParams(array(
            'Digit' => $pMax
        ));

        $old = time() - $pMax;

        $collection = new Collection(self::DB_COLLECTION);

        $conditions = new Conditions();
        $conditions->add('access', Conditions::LT, $old);

        $collection->load($conditions);
        $collection->deleteItems();

        return true;
    }
public function _clean ( $ pMax ) { Agl :: validateParams ( array ( 'Digit' => $ pMax ) ) ; $ old = time ( ) - $ pMax ; $ collection = new Collection ( self :: DB_COLLECTION ) ; $ conditions = new Conditions ( ) ; $ conditions -> add ( 'access' , Conditions :: LT , $ old ) ; $ collection -> load ( $ conditions ) ; $ collection -> deleteItems ( ) ; return true ; }
Clean the database by deleting old sessions.

@param int $pMax Session lifetime
@return bool
Clean the database by deleting old sessions .