src/MailMap/MailMap.php
public function query($inbox = 'INBOX', callable $queryCall = null)
    {
        $query = new Query;

        if (!is_null($queryCall)) {
            $query = $queryCall($query);
        }

        return $query->get($this->factory->create($inbox), $this->mailFactory);
    }
public function query($inbox = 'INBOX', callable $queryCall = null)
    {
        $query = new Query;

        if (!is_null($queryCall)) {
            $query = $queryCall($query);
        }

        return $query->get($this->factory->create($inbox), $this->mailFactory);
    }
public function query ( $ inbox = 'INBOX' , callable $ queryCall = null ) { $ query = new Query ; if ( ! is_null ( $ queryCall ) ) { $ query = $ queryCall ( $ query ) ; } return $ query -> get ( $ this -> factory -> create ( $ inbox ) , $ this -> mailFactory ) ; }
Execute query on a new connection and wrap results in Mail wrappers.

Provide a callable to set conditions, sorting, and limits on query.
The query instance will be provided as the single arguement to the
callable.

@param  string $inbox
@param  callable $queryCall
@return array
Execute query on a new connection and wrap results in Mail wrappers .