Constructs an appropriate Weight implementation for this query.

@param  Zend_Search_Lucene_Interface $reader
@return Zend_Search_Lucene_Search_Weight
770518
public function createWeight(Zend_Search_Lucene_Interface $reader)
    {
        include_once 'Zend/Search/Lucene/Search/Weight/Phrase.php';
        $this->_weight = new Zend_Search_Lucene_Search_Weight_Phrase($this, $reader);
        return $this->_weight;
    }
35197
public function runStatements(Reader $reader)
    {
        if (self::DELIM_NONE == $this->delimiterType) {
            include_once 'phing/tasks/ext/pdo/DummyPDOQuerySplitter.php';
            $splitter = new DummyPDOQuerySplitter($this, $reader);
        } elseif (self::DELIM_NORMAL == $this->delimiterType && 0 === strpos($this->getUrl(), 'pgsql:')) {
            include_once 'phing/tasks/ext/pdo/PgsqlPDOQuerySplitter.php';
            $splitter = new PgsqlPDOQuerySplitter($this, $reader);
        } else {
            include_once 'phing/tasks/ext/pdo/DefaultPDOQuerySplitter.php';
            $splitter = new DefaultPDOQuerySplitter($this, $reader, $this->delimiterType);
        }

        try {
            while (null !== ($query = $splitter->nextQuery())) {
                $this->log("SQL: " . $query, Project::MSG_VERBOSE);
                $this->execSQL($query);
            }
        } catch (PDOException $e) {
            throw $e;
        }
    }
1239767
private function createReader()
    {
        $reader = phpiredis_reader_create();

        phpiredis_reader_set_status_handler($reader, $this->getStatusHandler());
        phpiredis_reader_set_error_handler($reader, $this->getErrorHandler());

        return $reader;
    }
1291826
@Override
  public MtasSpanWeight createWeight(IndexSearcher searcher,
      boolean needsScores, float boost) throws IOException {
    SpanWeight spanWeight = ((SpanQuery) searcher.rewrite(clause))
        .createWeight(searcher, needsScores, boost);
    return new SpanTermWeight(spanWeight, searcher, boost);
  }
1049883
protected function queue_declare_ok($reader)
    {
        $queue = $reader->read_shortstr();
        $message_count = $reader->read_long();
        $consumer_count = $reader->read_long();

        return array($queue, $message_count, $consumer_count);
    }
995686
public static function readerNode(XMLReader $reader)
    {
        switch ($reader->nodeType) {
            case XMLREADER::NONE:
                return '%(0)%';

            case XMLReader::ELEMENT:
                return XMLBuild::startTag($reader->name, new XMLAttributeIterator($reader));

            default:
                $node = new XMLReaderNode($reader);
                $nodeTypeName = $node->getNodeTypeName();
                $nodeType = $reader->nodeType;
                return sprintf('%%%s (%d)%%', $nodeTypeName, $nodeType);
        }
    }
108200
public function setQueryWeight(float $weight): Query
    {
        $query = $this->getParam('query');
        $query['query_weight'] = $weight;

        return $this->setParam('query', $query);
    }
1149931
protected StreamTokenizer getStreamTokenizer(Reader reader) {
        final StreamTokenizer streamTokenizer = new StreamTokenizer(reader);
        streamTokenizer.resetSyntax();
        streamTokenizer.wordChars('a', 'z');
        streamTokenizer.wordChars('A', 'Z');
        streamTokenizer.wordChars('-', '-');
        streamTokenizer.wordChars('_', '_');
        streamTokenizer.wordChars('0', '9');
        streamTokenizer.wordChars('á', ' ');
        streamTokenizer.whitespaceChars(0, ' ');
        streamTokenizer.quoteChar('"');
        streamTokenizer.eolIsSignificant(true);
        streamTokenizer.ordinaryChar('(');
        streamTokenizer.ordinaryChar(')');
        return streamTokenizer;
    }
364483
public function reader($key, $reader = null)
    {
        if ($reader === null) {
            return $this->getConfig('readers.' . $key);
        }

        return $this->setConfig('readers.' . $key, $reader);
    }
769223
public function setRescoreQueryWeight(float $weight): Query
    {
        $query = $this->getParam('query');
        $query['rescore_query_weight'] = $weight;

        return $this->setParam('query', $query);
    }
1043927
protected function extract(StreamReader $reader)
    {
        $cycles = -1;
        $bytesPerCycle = 100;

        $reader->reset(null, $bytesPerCycle);

        while (
            ($trailerPos = \strpos($reader->getBuffer(false), 'trailer', \max($bytesPerCycle * $cycles++, 0))) === false
        ) {
            if ($reader->increaseLength($bytesPerCycle) === false) {
                break;
            }
        }

        if ($trailerPos === false) {
            throw new CrossReferenceException(
                'Unexpected end of cross reference. "trailer"-keyword not found.',
                CrossReferenceException::NO_TRAILER_FOUND
            );
        }

        $xrefContent = \substr($reader->getBuffer(false), 0, $trailerPos);
        $reader->reset($reader->getPosition() + $trailerPos);

        return $xrefContent;
    }
1220370
public function getReaderAttribute()
    {
        if (auth()->check()) {
            $reader = $this->readers()->where('forum_threads_read.user_id', auth()->user()->getKey())->first();

            return (!is_null($reader)) ? $reader->pivot : null;
        }

        return null;
    }
1052237
public function readerLoop($reader)
    {
        $tree = new \stdClass();

        while ($reader->read()) {
            switch ($reader->nodeType) {
                case \XMLReader::END_ELEMENT:
                    return $tree;
                    break;
                case \XMLReader::ELEMENT:
                    $this->processElement($reader, $tree);

                    if ($reader->hasAttributes) {
                        $this->processAttributes($reader, $tree);
                    }
                    break;
                case \XMLReader::TEXT:
                case \XMLReader::CDATA:
                    $tree = \Genesis\Utils\Common::stringToBoolean(
                        trim($reader->expand()->textContent)
                    );
                    break;
            }
        }

        return $tree;
    }
770754
final function FetchFromReader(DBInterfaces\IDatabaseReader $reader)
    {
        $objects = array();
        while($reader->Read())
        {
            $object = $this->CreateInstance($reader->ByName($this->KeyField()));
            $object->InitFromReader($reader);
            $objects[] = $object;
        }
        $reader->Close();
        return $objects;
    }
1104328
public function getReader()
    {
        if ($this->reader) {
            return $this->reader;
        }

        $className = $this->getDoctrineAnnotationReaderClassName();

        $r = new ReflectionClass($className);

        $instance = $r->newInstance();

        if (!$instance instanceof DoctrineAnnotationsReaderInterface) {
            $errMsg = sprintf('Reader not implement %s', DoctrineAnnotationsReaderInterface::class);
            throw new Exception\InvalidDoctrineAnnotationsReaderException($errMsg);
        }

        $this->reader = $instance;

        return $this->reader;
    }
1137722
public function read($read)
	{
		$data = null;
		if (isset($_REQUEST[$read])) {
			$data = (string) preg_replace('/[^A-Z_]/i', '', $_REQUEST[$read]);
		}
		return $data;
	}
889892
public function addConfigReader(Config\ReaderInterface $reader) {
		$id = $reader->getId();
		
		if (isset($this->configReaders[$id])) {
			throw new Exceptions\InvalidConfig('Configuration reader with ID "' . $id . '" already exists');
		}
		
		$this->configReaders[] = $reader;
		
		foreach ($reader->getIncludes() as $include) {
			$this->load($include);
		}
		
		return $this;
	}