public function find($callable = null)
    {
        /** @var Cursor $cursor */
        $cursor = new Cursor($this, array(
            'expressionClass'   => $this->definition->getExpressionClass(),
            'batchSize'         => $this->definition->getOption('batchSize'),
            'clientTimeout'     => $this->definition->getOption('cursorClientTimeout'),
            'serverTimeout'     => $this->definition->getOption('cursorServerTimeout'),
        ));

        if (is_callable($callable)) {
            $callable($cursor->getExpression());
        }

        return $cursor;
    }
public function find($callable = null)
    {
        /** @var Cursor $cursor */
        $cursor = new Cursor($this, array(
            'expressionClass'   => $this->definition->getExpressionClass(),
            'batchSize'         => $this->definition->getOption('batchSize'),
            'clientTimeout'     => $this->definition->getOption('cursorClientTimeout'),
            'serverTimeout'     => $this->definition->getOption('cursorServerTimeout'),
        ));

        if (is_callable($callable)) {
            $callable($cursor->getExpression());
        }

        return $cursor;
    }
public function find ( $ callable = null ) { /** @var Cursor $cursor */ $ cursor = new Cursor ( $ this , array ( 'expressionClass' => $ this -> definition -> getExpressionClass ( ) , 'batchSize' => $ this -> definition -> getOption ( 'batchSize' ) , 'clientTimeout' => $ this -> definition -> getOption ( 'cursorClientTimeout' ) , 'serverTimeout' => $ this -> definition -> getOption ( 'cursorServerTimeout' ) , ) ) ; if ( is_callable ( $ callable ) ) { $ callable ( $ cursor -> getExpression ( ) ) ; } return $ cursor ; }
Create document query builder

@param $callable callable|null Function to configure query builder&

@return Cursor
Create document query builder