切换数据源对象

@param null $id
@return mixed
555784
public static function Using($id = null)
    {
        if (!$id) {
            //初始运行
            self::$using_dbo_id = self::$default_dbo_id;
        } else {
            //切换dbo id
            if ($id != self::$using_dbo_id) {
                self::$using_dbo_id = $id;
            }
        }
        return self::dbo(self::$using_dbo_id);
    }
319832
public function delete($id = null)
    {
        $result = parent::delete($id);

        $this->handler->setBuilder($this)
            ->invalidateQuery(Reflector::QUERY_TYPE_DELETE, [Reflector::PRIMARY_KEY_COLUMN => $id]);

        return $result;
    }
258982
public function find(int $id)
    {
        if (isset($this->data[$id])) {
            return $this->data[$id];
        }

        return null;
    }
556192
public function lists($id = null)
    {
        if ($id !== null) {
            $this->setId($id);
        }

        return $this->getList();
    }
879018
public function getResult($id)
    {
        return isset($this->results[$id]) ? $this->results[$id] : null;
    }
534460
function get_identity($id = null)
    {
        $id = (int)$id;
        // cache identities for better performance
        if (!array_key_exists($id, $this->identities)) {
            $result = $this->list_identities($id ? "AND `identity_id` = $id" : '');
            $this->identities[$id] = $result[0];
        }

        return $this->identities[$id];
    }
341341
public function getRequest($id)
    {
        if (!isset($this->request[$id])) {
            return null;
        }

        return $this->request[$id];
    }
303286
protected function get($id = null)
    {
        $this->filter();

        if ($this->eagerLoad) {
            $this->model = $this->model->with($this->eagerLoad);
        }

        if ($id) {
            return $this->model->where('id', $id)->firstOrFail();
        }

        return $this->model->get();
    }
1231962
public function actionIndexPost($id=NULL)
	{
		if ($id === NULL)
			return $this->createNewPost();
		else
			return $this->updatePost($id);
	}
690298
public function get($id)
    {
        $document = $this->getFileCollection()->findOne(['_id' => $id]);
        return empty($document) ? null : $this->createDownload($document);
    }
966372
public function get($id = null)
    {
        if (!is_null($id)) {
            if (isset($this->sections[$id])) {
                return $this->sections[$id];
            }
            return;

        }
        return $this->sections;
    }
35753
public function findEntityById($id)
    {
        $item = $this->itemRepository->find($id);
        if (!$item) {
            return null;
        }

        return $item;
    }
162543
protected function loadModel($id = null)
	{
		/** @var BaseActiveRecord $modelClass */
		$modelClass = $this->modelClass();
		if($id) {
			$this->modelInstance = $modelClass::findOne($id);
		} else {
			$this->modelInstance = new $modelClass();
		}
		$this->modelInstance->load($this->attributes, '');
		return $this->modelInstance;
	}
1010196
public function find($id)
    {
        foreach ($this->findAll() as $repo) {
            if ($id == $repo->getId()) {
                return $repo;
            }
        }

        return null;
    }
894733
public static function id2dir($id = null) {
        if ($id === null) {
            return self::$maps ['id2dir'];
        }
        if (isset (self::$maps ['id2dir'] [ $id ])) {
            return self::$maps ['id2dir'] [ $id ];
        } else {
            return $id;
        }
    }
1347160
public function get ($id)
		{
			foreach ($this->_data as $category)
				if ($category->id == $id)
					return $category;

			return null;
		}
562766
final public function find(int $id = null)
    {
        $result = $this->first($id);

        if (!$result) {
            return null;
        }

        $this->setProperties($result);

        return $this;
    }