删除一整行
@return \Cassandra\Response\Response
431868
public function remove(){
        $query = Query::delete()
            ->from(static::$_name);
        
        $conditions = [];
        $bind = [];
        
        foreach(static::$_primary as $key){
            $conditions[] = $key . ' = ?';
            $bind[] = Type\Base::getTypeObject(static::$_columns[$key], $this[$key]);
        }
        
        $query->where(implode(' AND ', $conditions))
            ->bind($bind)
            ->setDbAdapter(static::$_dbAdapter)
            ->setConsistency(static::$_writeConsistency);
        
        return $query->querySync();
    }
486283
public function serve()
    {
        Log::debug('Request received:', [
            'Method'   => $this->request->getMethod(),
            'URI'      => $this->request->getRequestUri(),
            'Query'    => $this->request->getQueryString(),
            'Protocal' => $this->request->server->get('SERVER_PROTOCOL'),
            'Content'  => $this->request->getContent(),
        ]);

        $result = $this->handleRequest();

        $response = $this->buildResponse($result['response']);

        Log::debug('Server response created:', compact('response'));

        return new Response($response);
    }
1206674
public function run()
    {
        
        if (!empty($this->request)) {
            foreach ($this->request as $key => $value) {
                $this->_iterate($key, $value);
            }
        }
         
        return $this->getReport();
    }
532836
public function handler(): Response
    {
        $chinese = $this->request->get('chinese', '');
        $pinyin = new Pinyin();
        return response([
            'chinese' => $chinese,
            'pinyin' => $pinyin->convert($chinese)
        ]);
    }
911094
public function run()
    {
        if ($this->layout !== null) {
            $this->controller->layout = $this->layout;
        }

        $this->app->getResponse()->setStatusCodeByException($this->getException());

        if ($this->app->getRequest()->getIsAjax()) {
            return $this->renderAjaxResponse();
        }

        return $this->renderHtmlResponse();
    }
393069
public function run()
    {
        /* @var $model \yii\db\ActiveRecord */
        $model = new $this->modelClass();
        if ($this->scenario) {
            $model->setScenario($this->scenario);
        }
        if ($model->load(Yii::$app->request->post()) && $model->validate()) {
            foreach ($model->toArray() as $key => $value) {
                //Yii::$app->settings->set($key, $value, $this->controller->module->id, $model->types[$key]);
                Yii::$app->settings->set($key, $value, $model->formName(), $model->types[$key]);
            }
            Yii::$app->getSession()->addFlash('success', Yii::t('system', 'Successfully saved settings.'));
            return $this->controller->redirect([$this->controller->action->id]);
        }
        foreach ($model->attributes() as $key) {
            $model->{$key} = Yii::$app->settings->get($key, $model->formName());
            //$model->{$key} = Yii::$app->settings->get($key, $this->controller->module->id);//直接使用模块ID
        }
        return $this->controller->render($this->viewName, ['model' => $model]);
    }
141220
public function execute()
    {
        $this->_setOptions();

        $response = $this->_execute();
        $this->_saveStatusCode();

        $curlErrorNumber = $this->_getErrorNumber();

        $this->_close();

        if ($curlErrorNumber) {
            /**
             * @var \OxidEsales\Eshop\Core\Exception\StandardException $exception
             */
            $exception = oxNew(\OxidEsales\Eshop\Core\Exception\StandardException::class);
            $lang = \OxidEsales\Eshop\Core\Registry::getLang();
            $exception->setMessage(sprintf($lang->translateString('EXCEPTION_CURL_ERROR', $lang->getTplLanguage()), $curlErrorNumber));
            throw $exception;
        }

        return $response;
    }
1321856
public function run()
	{
		$this->connect();

		try
		{
			while (!$this->feof())
			{
				$data = $this->irc_read(60); // We wait 60 seconds but it's arbitrary and can be safely modified...
				if ($data === false)
				{
					continue;
				}

				$this->callListeners($data);
			}
		}
		catch (SocketDisconnectedException $e)
		{
			return $this;
		}

		return $this;
	}
804435
public function Run()
    {
        $bSuccess = false;

        set_time_limit(1800);
        TCacheManager::SetDisableCaching(true);
        TCacheManagerRuntimeCache::SetEnableAutoCaching(false);
        if ($this->Prepare()) {
            $bSuccess = $this->Perform();
        }
        $this->Cleanup($bSuccess);
        TCacheManager::SetDisableCaching(false);
        TCacheManagerRuntimeCache::SetEnableAutoCaching(true);

        return $bSuccess;
    }
999207
public function execute() {
		$results = ArrayList::create();
		foreach($this->classes as $c) {

			if($this->isOmitted($c)) continue;

			$list = DataList::create($c)
						->filter('ClassName', $c)
						->limit($this->getLimitFor($c))
						->sort("RAND()");

			foreach($list as $record) {
				$results->push($record);
			}
		}

		return $results;		
	}
669657
public function run()
    {
        if ($this->is_route == true) {
            if ($this->segments instanceof \Closure) {
                echo call_user_func($this->segments);
                die();
            } else {
                $class = $this->getBundleUrl();
            }
        } else {
            $class = $this->getUnBundleUrl();

            if (!class_exists($class)) {

                $this->initDefaultRoute();

                $class = $this->getBundleUrl();
            }
        }

        if (!class_exists($class)) {
            $message = sprintf('No route found for "%s %s"', Zilf::$container['request']->getMethod(), Zilf::$container['request']->getPathInfo());

            if ($referer = Zilf::$container['request']->headers->get('referer')) {
                $message .= sprintf(' (from "%s")', $referer);
            }
            throw new NotFoundHttpException($message);
        }

        unset($this->segments);

        //将参数追加到GET里面
        if (!empty($this->params)) {
            foreach ($this->params as $key => $row) {
                if (is_string($key)) {
                    $_GET[$key] = $row;
                } else {
                    $_GET['zget' . $key] = $row;
                }
            }
            Zilf::$container->getShare('request')->query->add($_GET);
        }

        $object = Zilf::$container->build($class, []);
        if (method_exists($object, $this->action)) {

            $response = call_user_func_array(array($object, $this->action), $this->params);
            if (!$response instanceof Response) {
                $msg = sprintf('The controller must return a response (%s given).', $this->varToString($response));

                // the user may have forgotten to return something
                if (null === $response) {
                    $msg .= ' Did you forget to add a return statement somewhere in your controller?';
                }
                throw new \LogicException($msg);
            }
            $response->send();

        } else {
            throw new \Exception('类: ' . $class . ' 调用的方法：' . $this->action . ' 不存在！');
        }
    }
5796
public function execute()
    {
        $data = [
            self::ENTRY_FLUSH => $this->_flush,
            self::ENTRY_COUNT => true
        ];

        if ($this->_batchSize > 0) {
            $data[self::ENTRY_BATCHSIZE] = $this->_batchSize;
        }

        if ($this->_limit > 0) {
            $data[self::ENTRY_LIMIT] = $this->_limit;
        }

        if (is_array($this->_restrictions)) {
            $data[self::ENTRY_RESTRICT] = $this->_restrictions;
        }

        $collection = $this->_collection;
        if ($collection instanceof Collection) {
            $collection = $collection->getName();
        }

        $url      = UrlHelper::appendParamsUrl(Urls::URL_EXPORT, ['collection' => $collection]);
        $response = $this->_connection->post($url, $this->getConnection()->json_encode_wrapper($data));

        return new ExportCursor($this->_connection, $response->getJson(), $this->getCursorOptions());
    }
426759
protected function doInsert()
    {
        //check if there is an error from previous function execution
        if (static::$response["status"] == "error") {
           return static::terminate(static::$response);
        }
        //convert each columns to ? parameter
        $columnParam = array_map(function () {
            return '?';
        }, $this->values);


        $sql = /** @lang sql */
            'INSERT INTO ' . self::$table .
            ' (' . $this->columns .
            ') VALUES(' . implode(',', $columnParam) . ')';

            $ext=array_map(function ($column){
                return $column.'=VALUES('.$column.')';
            },explode(',',$this->columns));
            if($this->updateOrInsert){ //if update when duplicate is found is set to true
                $sql.=' ON DUPLICATE KEY UPDATE '.implode(',',$ext);
            }

        try {
            $stm = Connect::getConn()->prepare($sql);
        } catch (Exception $e) {
            static::$response["status"] = "error";
            static::$response["response"] = $e->getMessage();
            static::$response["code"] = $e->getCode();
           return static::terminate(static::$response);
        }

        try {
            $stm->execute($this->values);

            static::$response["status"] = "success";
            static::$response["response"] = "success";
            static::$response["code"] = 200;

            return static::terminate(static::$response);
        } catch (Exception $e) {
            static::$response["status"] = "error";
            static::$response["response"] = $e->getMessage();
            static::$response["code"] = $e->getCode();
            return static::terminate(static::$response);
        }
    }
758550
public function run(): Response
    {
        try {
            $response = $this->dispatch();
            $this->send($response);
        } catch (\Error $e) {
            $response = $this->exceptionHandler->handleError($e);
            $this->send($response);
        } catch (\Exception $e) {
            $response = $this->exceptionHandler->handleException($e);
            $this->send($response);
        }

        return $response;
    }
821520
public function refresh(): Response
    {
        $endpoint = new \Elasticsearch\Endpoints\Cluster\Nodes\Stats();
        $endpoint->setNodeID($this->getNode()->getName());

        $this->_response = $this->getNode()->getClient()->requestEndpoint($endpoint);
        $data = $this->getResponse()->getData();
        $this->_data = \reset($data['nodes']);

        return $this->_response;
    }
274071
public function handler(): Response
    {
        $response = [];
        foreach (Role::all(['createdAt' => 'ASC']) as $role) {
            $response[] = [
                'id' => $role->getId(),
                'name' => $role->getName(),
                'slug' => $role->getSlug(),
                'color' => $role->getColor(),
                'icon' => $role->getIcon()
            ];
        }
        return response($response);
    }
75736
public function run() {

		if( isset( $this->model ) ) {

			$document = File::loadFile( $this->model->document, $this->fileName );

			if( $this->modelService->updateDocument( $this->model, $document ) ) {

				$response = [ 'fileUrl' => $document->getFileUrl() ];

				// Trigger Ajax Success
				return AjaxUtil::generateSuccess( Yii::$app->coreMessage->getMessage( CoreGlobal::MESSAGE_REQUEST ), $response );
			}

			// Trigger Ajax Failure
			return AjaxUtil::generateFailure( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_REQUEST ) );
		}

		// Trigger Ajax Failure
		return AjaxUtil::generateFailure( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
	}