src/Storage/Db.php
public function clear($uid = null) {
        $options = $this->getOptions();
        if ($uid) {
            if (!$this->has($uid)) {
                return false;
            }
            $stmt = $this->adapter->query(sprintf('DELETE FROM %s WHERE %s = "%s"', $options['table'], $options['column_key'], $uid), Adapter::QUERY_MODE_EXECUTE);
            return true;
        }
        $stmt = $this->adapter->query(sprintf('TRUNCATE TABLE %s', $options['table']), Adapter::QUERY_MODE_EXECUTE);
        return true;
    }
public function clear($uid = null) {
        $options = $this->getOptions();
        if ($uid) {
            if (!$this->has($uid)) {
                return false;
            }
            $stmt = $this->adapter->query(sprintf('DELETE FROM %s WHERE %s = "%s"', $options['table'], $options['column_key'], $uid), Adapter::QUERY_MODE_EXECUTE);
            return true;
        }
        $stmt = $this->adapter->query(sprintf('TRUNCATE TABLE %s', $options['table']), Adapter::QUERY_MODE_EXECUTE);
        return true;
    }
public function clear ( $ uid = null ) { $ options = $ this -> getOptions ( ) ; if ( $ uid ) { if ( ! $ this -> has ( $ uid ) ) { return false ; } $ stmt = $ this -> adapter -> query ( sprintf ( 'DELETE FROM %s WHERE %s = "%s"' , $ options [ 'table' ] , $ options [ 'column_key' ] , $ uid ) , Adapter :: QUERY_MODE_EXECUTE ) ; return true ; } $ stmt = $ this -> adapter -> query ( sprintf ( 'TRUNCATE TABLE %s' , $ options [ 'table' ] ) , Adapter :: QUERY_MODE_EXECUTE ) ; return true ; }
Clear datas with $uid key
@param mixed $uid
@return void
Clear datas with $uid key