Fetches the first value from current row.
@return mixed
199782
public function fetchSingle(){
		$this->performed || $this->run();
		$row = $this->connection->getDriver()->fetch($this->resultSet);

		if(!$row)
			return false;
		$value = reset($row);

		// Type converting
		if($this->detectTypes)
			$this->detectTypes();
		if(!empty($this->columnTypes)){
			$key = key($row);
			if(isset($this->columnTypes[$key]))
				$value = $this->convertType($value, $this->columnTypes[$key]);
		}

		return $value;
	}
816111
public function getFirst()
    {
        if (0 === count($this->data)) {
            return null;
        }
        reset($this->data);

        return current($this->data);
    }
1206836
public function first()
    {
        if ($this->isEmpty()) {
            return $this->makeItem(null);
        }

        $arResultIDList = $this->arElementIDList;

        $iElementID = array_shift($arResultIDList);

        return $this->makeItem($iElementID);
    }
596927
public function first()
    {
        $this->seek(0);

        if ($this->count()) {
            return $this->rows[ $this->position ];
        }

        return new Row();
    }
251114
public function getRow()
	{
		$alias = $this->getAlias();
		$rows = static::findById( $this->id )->loadArray();
		$row = array_shift( $rows );
		$ret = $this->fromArray( $row[ $alias ], true );
		return $ret;
	}
734979
public function first(): ?\stdClass
    {
        $pdoStatement = $this->provideStatement();
        $pdoStatement = $this->execute($pdoStatement);
        $row = $pdoStatement->fetch(\PDO::FETCH_OBJ);
        return (!empty($row)) ? $row : null;
    }
339190
public function first()
	{
		//get the limit clause value
		$limit = $this->limits;

		//get the offset value
		$limitOffset = $this->offset;

		//set the limit to 1
		$this->limit(1);

		//get all
		$all = $this->all();

		//get the first
		$first = ArrayUtility::first($all->result_array())->get();

		//if limit is defined
		if ( $limit ) 
		{
			//set the limit property
			$this->limits = $limit;

		}

		//if limit offset is set
		if ( $limitOffset ) 
		{
			//set the offset
			$this->offset = $limitOffset;

		}

		//get the response object instance
		$this->responseObject
			->setResultArray($first);

		//return the full response object
		return $this->responseObject;

	}
354274
public function first()
    {
        $tmpArray = $this->getArray();

        $key_first = array_key_first($tmpArray);
        if ($key_first === null) {
            return null;
        }

        return $tmpArray[$key_first];
    }
1317620
public function first()
    {
        foreach ($this->dataQuery->firstRow()->execute() as $row) {
            return $this->createDataObject($row);
        }
        return null;
    }
1111369
public function getCurrentRow()
    {
        if (isset($this->_currentRow) && $this->_currentRow->isFilled()) {
            $this->_currentRow = null;
        }
        if (is_null($this->_currentRow)) {
            $this->_currentRow = Yii::createObject(array_merge(['class' => $this->rowClass], $this->baseRow));
            $this->_rows[] = $this->_currentRow;
        }

        return $this->_currentRow;
    }
1139039
public function first()
    {
        $path = $this->model->getPath('show');

        $this->query->from($path);

        return $this->get()->first();
    }
234237
public function getFirst()
    {
        if (count($this->children)) {
            reset($this->children);
            return current($this->children);
        } else {
            return null;
        }
    }
359737
public function getPrevious()
    {
        if ($this->isFirst()) {
            return null;
        }

        $this->seek($this->getPosition() - 1);

        return $this->current();
    }
189487
public function first()
    {
        $sql = clone($this);
        $sql->limit(1);
        $collection = $this->query($sql);
        return $collection->isEmpty() ? null : $collection[0];
    }
687668
public function first()
    {
        $events = $this->_entity->getEventManager();
        $event = new SelectEvent(
            [
                'sqlQuery' => &$this,
                'params' => [],
                'action' => SelectEvent::FIND_FIRST,
                'singleItem' => true
            ]
        );
        $events->trigger(SelectEvent::BEFORE_SELECT, $this->_entity, $event);
        $row = parent::first();
        $event->data = $row;
        $events->trigger(SelectEvent::AFTER_SELECT, $this->_entity, $event);
        $class = $this->_entity->getClassName();
        return new $class($row);
    }
1076550
public function getValues()
    {
        while ($row = $this->getNextRow()) {
            if ($this->columnCount() > 1) {
                $key = rtrim(reset($row));
                $val = rtrim(next($row));
                yield $key => $val;
            } else {
                yield rtrim(reset($row));
            }
        }
    }
637395
public function fetchRow()
    {
        $sth = $this->execute();
        $db = $this->db;

        return $sth->fetch($db::FETCH_ASSOC);
    }