DB\Cursor::findone PHP Method

findone() public method

Return first record (mapper object) that matches criteria
public findone ( $filter = NULL, array $options = NULL, $ttl ) : static | FALSE
$filter string|array
$options array array
$ttl int
return static | FALSE
    function findone($filter = NULL, array $options = NULL, $ttl = 0)
    {
        if (!$options) {
            $options = [];
        }
        // Override limit
        $options['limit'] = 1;
        return ($data = $this->find($filter, $options, $ttl)) ? $data[0] : FALSE;
    }