Find something, means select one record by key

@param string 		$table
@param int			$id
@param string			$key
@param string			$handler
@return mixed
199288
public static function find( $table, $id, $key = null, $handler = null ) 
	{
		return Query::select( $table )->find( $id, $key, $handler );
	}
849415
public function find($id, $columns = ['*'])
    {
        $this->newQuery();

        return $this->query->find($id, $columns);
    }
303117
public function find($id = null)
    {
        // ID has to be defined
        if (!isset($id)) {
            throw new \InvalidArgumentException('Undefined ID to find', 400);
        }

        // Return the first found record using the primary key for the where
        $result = $this->where($this->primaryKey, $id, '=', $this->table)->limit(1)->first();

        // Return the first matching record
        return $result;
    }
260480
public final function findOne($id, $fields = '*') {
        if (is_array($id)) {
            $where = $id;
        } else {
            $idf   = $this->primaryKey;
            $where = [$idf => $id];
        }
        if (is_array($fields)) {
            $sql = $this->select(...$fields);
        } else {
            $sql = $this->select($fields);
        }
        $sql->where($where)->limit(0, 1);

        return $sql;
    }
916909
public function findById($id)
    {
        $query =
            'SELECT `' .
            $this->getFields("`, `") . '`
            FROM ' . $this->tableName .
            ' WHERE `id`=:id LIMIT 1';
        $statement = $this->database->prepare($query);
        $statement->bindParam(':id', $id);
        $statement->execute();
        $this->entity->fill($statement->fetch());
        return $this->entity;
    }
805442
public function find($id)
    {
        $query = $this->getQuery();
        if ($this->isRestorable()) {
            $query->withTrashed();
        }

        return $query->find($id);
    }
15279
public function find($id, Data $data = null)
    {
        $id = $this->normalizeID($id);
        $registry = Registry::getInstance();

        if (!$data) {
            if ($data = $registry->get($this->class, $id)) {
                return $data;
            }
        }

        if (!$record = $this->doFind($id)) {
            return false;
        }

        $data = $this->pack($record, $data ?: null);
        $registry->set($data);

        return $data;
    }
936522
public function queryAndFetch($sql, Closure $handler)
	{
		$sth = $this->query($sql);

		while (($row = $sth->fetch(PDO::FETCH_ASSOC)))
			$handler($row);
	}
528756
public function findById($id, $format=false)
    {
        $query = $this->getQuery();
        
        if (isset($query['table'])) {
            $pk = $this->getPrimaryKey($query['table'][0]);
        } else {
            $pk = $this->getPrimarykey();
        }
        
        if (!isset($pk)) {
            throw new Exception('Can\'t get primary key of table:' . $this->getTableName());
        }
        
        if (!is_array($id)) {
            $pk = StringHelper::toArray($pk)[0];
            $where = [ $pk => intval($id)];
        } else {
            foreach ($pk as $num => $field) {
                $where[] = array( $field => intval($id[$num]) );
            }
        }
        
        return $this->where($where)->find(null, $format);
    }
308253
protected static function selectOne($model, $tableName, $id)
    {
        $connection = Connection::connect();

        $getAll = $connection->prepare('select * from '.$tableName.' where id='.$id);
        $getAll->execute();

        $row = $getAll->fetch(PDO::FETCH_ASSOC);
        array_push($model->resultRows, $row);
        
        return $model;
    }
79638
public function find(string $table, string $key_field, $value)
    {
        $this->qb([
            'table' => $table,
            'filter' => $key_field . '=:' . $key_field,
            'params' => [
                ':' . $key_field => $value
            ]
        ]);
        
        return $this->single();
    }
1136640
public function handlerById($id)
    {
        if (isset($this->_handlers[$id])) {
            return $this->_handlers[$id];
        }
        throw new \Exception("Property handler with id {$id} not found");
    }
426494
public static function find($id)
    {
        self::init();
        $query = 'SELECT * FROM ' . self::$modelTable . ' WHERE id = '.$id;
        $qb = new QueryBuilder(self::$connect, $query);
        $rows = $qb->get();
        $collection = self::makeCollection($rows);
        return !empty($collection) ? array_shift($collection) : null;
    }
134311
public function find($controller, $id)
    {
        $model = $controller->model();
        if ($controller->withTrashed()) {
            return $model::withTrashed()->find($id);
        } else {
            return $model::find($id);
        }
    }
219728
public function find($id, $returnType = Table::RETURN_MODEL) {
        return $this->findBy($this->getPrimaryKey(), $id, $returnType);
    }
256265
public function getSelector($pkey, array $record)
    {
        if ($pkey !== null && !is_array($pkey))
            throw new InvalidTypeException("Invalid primary key: " . WF::str($pkey));

        // When no primary key is available, we match on all fields
        $is_primary_key = true;
        if ($pkey === null)
        {
            $pkey = array();
            foreach ($record as $k => $v)
                $pkey[$k] = $this->table->getColumn($v);
            $is_primary_key = false;
        }

        // Make sure there are fields to match on
        if (empty($pkey))
            throw new InvalidTypeException("No fields to match on");

        $condition = null;
        foreach ($pkey as $pkey_column => $coldef)
        {
            if ($is_primary_key && (!array_key_exists($pkey_column, $record) || $record[$pkey_column] === null))
                throw new DAOException("Record does not have value for primary key column {$pkey_column}");
            
            $pkey_value = $coldef->beforeInsertFilter($record[$pkey_column]);
            $comparator = new Query\ComparisonOperator("=", $pkey_column, $pkey_value);
            $condition = $condition === null ? $comparator : new Query\BooleanOperator("AND", $condition, $comparator);
        }

        return $condition;
    }
515159
public function find($id, $columns = ['*'])
    {
        if (is_array($id) || $id instanceof Arrayable) {
            return $this->findMany($id, $columns);
        }

        return $this->whereKey($id)->first($columns);
    }