DB\SQL\Mapper::find PHP Method

find() public method

Return records that match criteria
public find ( $filter = NULL, array $options = NULL, $ttl ) : static[]
$filter string|array
$options array array
$ttl int|array
return static[]
    function find($filter = NULL, array $options = NULL, $ttl = 0)
    {
        if (!$options) {
            $options = [];
        }
        $options += ['group' => NULL, 'order' => NULL, 'limit' => 0, 'offset' => 0];
        $adhoc = '';
        foreach ($this->adhoc as $key => $field) {
            $adhoc .= ',' . $field['expr'] . ' AS ' . $this->db->quotekey($key);
        }
        return $this->select(($options['group'] && !preg_match('/mysql|sqlite/', $this->engine) ? $options['group'] : implode(',', array_map([$this->db, 'quotekey'], array_keys($this->fields)))) . $adhoc, $filter, $options, $ttl);
    }