根据Id获取对象
@param  string|int $id
@return array
503366
public function fetchById($id) {
		return $this->getConnection()->where($this->getDao()->getTableId(), $id)->get($this->getDao()->getTableName());
	}
328579
public function get(string $id = null): array
    {
        if ($this->has($id)) {
            return $this->cache[$id];
        }

        return [];
    }
1124453
public function resolveId($id)
    {
        return $this->aliases->has($id)
            ? $this->aliases->getId($id)
            : $id;
    }
457070
protected function _getById($id) {
		$model = $this->_config['model'];
		return $model::find('first', ['conditions' => [$model::key() => $id]]);
	}
1144126
public static function getIdValue(array $id) 
    {
        self::formatScalarValues($id);
        if (\is_array($id)) {
            RecursiveDeleteHelper::deleteKeys($id, [Serializer::CLASS_IDENTIFIER_KEY]);
        }

        return $id;
    }
310123
public function get($id = null){
        if(!is_null($id)){
            return $this->find($id);
        }
        return $this->model->get();
    }
1143089
public function read( $id )
	{
	    if ( $this->has( $id ) )
		{
			return \CCJson::read( $this->file_path( $id ) );
		}
		
		return array();
	}
1287791
public function delete($id)
    {
        $db = new DB();
        $result = $db->db()->delete(['db_name'=>__config()->auth->db_name, 'table'=>__config()->auth->db_table, 'wheres'=>['id ='."'{$id}'"]]);
        $db->db()->close();

        return $result;
    }
1225658
public function getById($id)
    {
		$repo   = $this->getRepository('erdiko\users\entities\User');
		$result = $repo->findOneBy(array('id' => $id ));

		return $result;
	}
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;
    }
796029
public static function get($id){
		if( isset(self::$instances[$id]) ){
			return self::$instances[$id];
		}
		return null;
	}
677763
public function uninstall($id)
    {
        $plugin = $this->getById($id);
        if (!$plugin) {
            return ['code' => -3, 'message' => 'Plugin not found'];
        }

        if (!$this->isInstalled($id)) {
            return ['code' => -4, 'message' => 'Plugin not installed'];
        }

        if ($this->isBuildIn($id)) {
            return ['code' => -5, 'message' => 'Can not uninstall build-in plugin'];
        }

        $ret = $plugin->uninstall();
        if ($ret['code'] !== 1) {
            return $ret;
        }

        $pluginIds = $this->getInstalledIds();
        $key = array_search($id, $pluginIds);
        if (false === $key) {
            return ['code' => -6, 'message' => 'Plugin not installed'];
        }
        unset($pluginIds[$key]);
        $this->setInstalledIds($pluginIds);

        $this->getEvents(true);

        return $ret;
    }
1131656
public function getById(int $id)
    {
        $result = $this->builder->getById($id);

        if (isset($result[0])) {
            return self::instance($result[0]);
        }

        return null;
    }
1325216
public function findOneById($id)
    {
        $id = $this->idToMongo($id);

        if ($this->identityMap->has($id)) {
            return $this->identityMap->get($id);
        }

        return $this->createQuery(array('_id' => $id))->one();
    }
1197770
public function get($id)
    {
        $idName = ucfirst($this->idProperty->getName());
        return $this->__call("getBy$idName", array($id));
    }
193218
protected function getAbstractId($id)
    {
        if (isset($this->aliases[$id])) {
            $id = $this->aliases[$id];
        }

        return $id;
    }
571923
public function getQuestion4Id($id)
    {
        $query = $this->createQueryBuilder('p')
            ->select('p')
            ->where('p.id = :id')
            ->setParameter('id', $id)
            ->getQuery();


        return $query->getOneOrNullResult();
    }