Destroy session

@param string $id
@return boolean
500841
public function destroy($id)
    {
        $return = false;

        $record = \Doctrine::getTable($this->_tableName)->find($id);
        if (false !== $record) {
            if ($record->delete()) {
                $return = true;
            }
        }

        return $return;
    }
38380
public function destroy($id)
    {
        $this->model = $this->model->findOrFail($id);

        $this->runChecks('destroy', $this->model->toArray());

        return $this->model->delete();
    }
93757
public function destroy($id)
    {
        $this->service->destroy($id);
        flash()->success('Se ha eliminado el artículo');
        return redirect()->to('backend/blog');
    }
206506
public function destroy($id)
    {
        // get route permission by id
        $routePermission = RoutePermission::find($id);

        if (!$routePermission) {
            return response()->json(null, 404);
        }

        // check current user is admin
        if (!(Auth::user() && Auth::user()->hasRole('admin'))) {
            return response()->json(null, 403);
        }

        // delete route permission
        $deleteRoutePermission = $routePermission->delete();

        if (!$deleteRoutePermission) {
            return response()->json(null, 500); // @codeCoverageIgnore
        }

        return response()->json(null, 204);
    }
970056
public function destroy($id)
    {
        $user = $this->user->findOrFail($id);

        if($user->delete()) return response()->json(['status' => 'ok']);

        return response()->json(['status' => 'failed']);
    }
1205404
public function do_destroy($session_id)
    {
        /** @var \ManaPHP\DbInterface $db */
        $db = $this->_di->getShared($this->_db);

        $db->delete($this->_source, ['session_id' => $session_id]);

        return true;
    }
954635
public function destroy($session_id = null)
    {
        @session_unset();
        if ($session_id === null) {
            $session_id = $this->getId();
        }
        return $this->cache->delete($this->prefix.$session_id);
    }
1375015
public function destroy($id)
    {
        if ( $this->permissions->delete($id) )
        {
            return Redirect::route('cpanel.permissions.index')
                ->with('success', Lang::get('cpanel::permissions.delete_success'));
        }
        else
        {
            return Redirect::route('cpanel.permissions.index')
                ->with('error', Lang::get('cpanel::permissions.model_not_found'));
        }
    }
193380
public function destroySession($id)
    {
        $this->db->getCollection($this->sessionCollection)->remove(
            ['id' => $id],
            ['justOne' => true]
        );

        return true;
    }
701352
public function destroy($id)
    {
        try
        {
            $this->groups->delete($id);

            return Redirect::route('cpanel.groups.index')
                ->with('success', Lang::get('cpanel::groups.delete_success'));
        }
        catch (GroupNotFoundException $e)
        {
            return Redirect::back()->with('error', $e->getMessage());
        }
    }
806564
public function delete($id)
    {
        if ($this->hasDeleteTrait($this->modelInstance)) {
            return $this->destroy($id);
        }

        return $this->modelInstance->destroy($id);
    }
402544
protected function _delete( $id ) {
		global $wpdb;

		$session_id = $this->sanitize( $id );

		$wpdb->delete( "{$wpdb->prefix}sm_sessions", [ 'session_key' => $session_id ] );
	}
1032404
public function destroy($id)
    {
        try {
            $file = $this->fileDB->getById($id);
            $this->fileDB->deleteFile($file);
            return 'File deleted';
        } catch (\Exception $e) {
            \Log::error($e);
            $this->flashMessage('delete-failed','danger');
            return 'Error: File not deleted';
        }
    }
1238800
public function destroy($session_id)
	{
		if (!xcache_isset($this->key($session_id)))
		{
			return true;
		}

		return xcache_unset($this->key($session_id));
	}
350671
public static function destroy($id)
    {
        $instance = new static;

        // We will actually get the models from the API and call delete on it.
        // This way its events get fired properly with a correct set of attributes
        // in case the developers wants to check these.
        $key   = $instance->getKeyName();
        $model = $instance->where($key, $id)->first();

        if ($model->delete()) {
            return true;
        }

        return false;
    }
1051535
public function destroy($session_id)
    {
        $this->pdo->queryWithParam(
            'DELETE FROM session WHERE session_id = :session_id',
            [[':session_id', $session_id, \PDO::PARAM_STR]]
        );

        return $this->pdo->getLastOperationStatus();
    }
239775
public function delete(string $id): bool
    {
        if (\array_key_exists($id, $this->cache)) {

            //delete value
            unset($this->cache[$id]);

            //return function result
            return true;
        }

        return false;
    }