根据Id删除记录
@param  string|int $id
@return int
557238
public function deleteById($id) {
		$this->provider('cache')->cacheClear('db', $this->getDao()->getTableName());
	    $obj = $this->getConnection()->where($this->getDao()->getTableId(), $id);
        return $obj->delete($this->getDao()->getTableName());
	}
918694
public function getById($id)
    {
        $id = (int) $id;
        $rowSet = $this->getTableGateway()->select([$this->getPrimaryKey() => $id]);
        $row = $rowSet->current();
        return $row;
    }
401521
public function getDataById($id)
    {
        $id = (int)$id;
        return array_key_exists($id, $this->_data) ? $this->_data[$id] : null;
    }
1015361
public function get($id)
    {
        if (isset($this->objects[$id])) {
            return $this->objects[$id];
        } else {
            return false;
        }
    }
546552
public function get($id)
    {
        $result = $this->query('+id:'.$id);

        if ($result->getNumFound() > 0) {
            $docs = $result->getDocs();

            return $docs[0];
        }

        return null;
    }
796029
public static function get($id){
		if( isset(self::$instances[$id]) ){
			return self::$instances[$id];
		}
		return null;
	}
1022361
public function find(int $id)
    {
        $response = $this->model->with($this->with)->find($id);
        $this->with = [];
        return $response;
    }
117299
public function getid($id){
		$n=strlen($id);
		$i=0;
		$arrname='';
		while(($i<$n)&&($id[$i]!='[')){
			$arrname.=$id[$i];
			$i++;
			}
		if($id[$i]=='['){
			$i++;
			}
		$appendix='';
		$brackets=1;//opened brackets

		while(($i<$n)&&($brackets>=0)){
			if($id[$i]=='['){
				$brackets++;
				}
			if($id[$i]==']'){
				$brackets--;
				}

			$appendix.=$id[$i];
			$i++;
			}
		if(strlen($appendix)>0){
			$appendix=substr($appendix, 0, -1);
			}
		$name='bfields['.$arrname.']'.(empty($appendix)?'':'['.$appendix.']');
		//echo('name="'.$name.'", id="'.$id.'"');
		return $name;
		}
706838
public static function find_by_id($id)
	{
		$row = self::oneOrNew($id);

		if (!$row->get('id'))
		{
			return false;
		}

		return $row;
	}
826091
public function remove($id) {
		$event  = $this->getProfiler()->startDelete('Remove: ' . $id);
		$result = $this->getBackend()->remove($id);
		
		if ($result === false) {
			$event->stopError();
		} else {
			$event->stopSuccess();
		}
		
		return $result;
	}
960746
private function getSharedItemKey(int $id): int
    {
        if ($id <= 0) {
            throw new \InvalidArgumentException('ID cannot be less or equals zero');
        }

        $st = @stat(__FILE__);
        if (!$st) {
            return -1;
        }

        //@TODO collisions? need more unique key
        $key = (int)sprintf("%u",
            (
                ($st['ino'] & 0xffff) |
                (($st['dev'] & 0xff) << 16) |
                (($id & 0xff) << 24)
            )
        );

        return $key;
    }
98477
public function delete($id)
    {
        if (!is_numeric($id)) {
            $this->setError('参数错误,分组ID不是数字');

            return false;
        }

        $queryStr = [
            'group' => ['id' => $id],
        ];

        $res = $this->_post('delete', $queryStr);

        return $res;
    }
1248832
public function params($id)
	{
		$params = '';

		if ($this->app->has('db'))
		{
			$db = $this->app['db'];

			$query = $db->getQuery()
				->select('params')
				->from('#__modules')
				->whereEquals('published', 1);

			// Select module params based on name or ID
			if (is_numeric($id))
			{
				$query->whereEquals('id', (int) $id);
			}
			else
			{
				$query->whereEquals('module', $id);
			}

			$db->setQuery($query->toString());
			$params = $db->loadResult();
		}

		//return params
		return new Registry($params);
	}
1272338
public function actionIndex($id)
    {
        // TODO 群发事件推送群发处理
        // TODO 模板消息事件推送处理
        // TODO 用户上报地理位置事件推送处理
        // TODO 自定义菜单事件推送处理
        // TODO 微信小店订单付款通知处理
        // TODO 微信卡卷(卡券通过审核、卡券被用户领取、卡券被用户删除)通知处理
        // TODO 智能设备接口
        // TODO 多客服转发处理
        $request = Yii::$app->request;
        $wechat = $this->findWechat($id);
        if (!$wechat->getSdk()->checkSignature()) {
            return 'Sign check fail!';
        }
        switch ($request->getMethod()) {
            case 'GET':
                if ($wechat->status == Wechat::STATUS_INACTIVE) { // 激活公众号
                    $wechat->updateAttributes(['status' => Wechat::STATUS_ACTIVE]);
                }
                return $request->get('echostr');
            case 'POST':
                $this->setWechat($wechat);
                $this->message = $this->parseRequest();
                $result = null;
                if($this->beforeProcess()) {
                    $result = $this->resolveProcess(); // 处理请求
                    $this->afterProcess($result);
                }
                return is_array($result) ? $this->createResponse($result) : $result;
            default:
                throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
963937
public function resolveId($id = null)
    {
        if ($id === null) {
            $id = $this->owner->getId();
        }
        if (isset($this->owner->htmlOptions['id'])) {
            $id = $this->owner->htmlOptions['id'];
        } else {
            $this->owner->htmlOptions['id'] = $id;
        }
        return $id;
    }
600327
public function getByID($id)
    {
        $id = (int) $id;

        return $id > 0 ? $this->em->find(Geolocator::class, $id) : null;
    }
1220677
public function getInfo($id)
    {
        // 验证有效性
        if ($this->isValid($id) === false) {
            return false;
        }
        $code = $this->_checkIdArgument($id);
        $addressInfo = $this->_getAddressInfo($code['addressCode'], $code['birthdayCode']);

        return [
            'addressCode'   => $code['addressCode'],
            'abandoned'     => isset($this->_addressCodeList[$code['addressCode']]) ? 0 : 1,
            'address'       => is_array($addressInfo) ? implode($addressInfo) : '',
            'addressTree'   => array_values($addressInfo),
            'birthdayCode'  => date('Y-m-d', strtotime($code['birthdayCode'])),
            'constellation' => $this->_getConstellation($code['birthdayCode']),
            'chineseZodiac' => $this->_getChineseZodiac($code['birthdayCode']),
            'sex'           => ($code['order'] % 2 === 0 ? 0 : 1),
            'length'        => $code['type'],
            'checkBit'      => $code['checkBit'],
        ];
    }