public static function parse(
        $objectNumberToken,
        $objectGenerationNumberToken,
        PdfParser $parser,
        Tokenizer $tokenizer,
        StreamReader $reader
    ) {
        $value = $parser->readValue();
        if ($value === false) {
            return false;
        }

        $nextToken = $tokenizer->getNextToken();
        if ($nextToken === 'stream') {
            $value = PdfStream::parse($value, $reader, $parser);
        } elseif ($nextToken !== false) {
            $tokenizer->pushStack($nextToken);
        }

        $v = new self;
        $v->objectNumber = (int) $objectNumberToken;
        $v->generationNumber = (int) $objectGenerationNumberToken;
        $v->value = $value;

        return $v;
    }
public static function parse(
        $objectNumberToken,
        $objectGenerationNumberToken,
        PdfParser $parser,
        Tokenizer $tokenizer,
        StreamReader $reader
    ) {
        $value = $parser->readValue();
        if ($value === false) {
            return false;
        }

        $nextToken = $tokenizer->getNextToken();
        if ($nextToken === 'stream') {
            $value = PdfStream::parse($value, $reader, $parser);
        } elseif ($nextToken !== false) {
            $tokenizer->pushStack($nextToken);
        }

        $v = new self;
        $v->objectNumber = (int) $objectNumberToken;
        $v->generationNumber = (int) $objectGenerationNumberToken;
        $v->value = $value;

        return $v;
    }
public static function parse ( $ objectNumberToken , $ objectGenerationNumberToken , PdfParser $ parser , Tokenizer $ tokenizer , StreamReader $ reader ) { $ value = $ parser -> readValue ( ) ; if ( $ value === false ) { return false ; } $ nextToken = $ tokenizer -> getNextToken ( ) ; if ( $ nextToken === 'stream' ) { $ value = PdfStream :: parse ( $ value , $ reader , $ parser ) ; } elseif ( $ nextToken !== false ) { $ tokenizer -> pushStack ( $ nextToken ) ; } $ v = new self ; $ v -> objectNumber = ( int ) $ objectNumberToken ; $ v -> generationNumber = ( int ) $ objectGenerationNumberToken ; $ v -> value = $ value ; return $ v ; }
Parses an indirect object from a tokenizer, parser and stream-reader.

@param int $objectNumberToken
@param int $objectGenerationNumberToken
@param PdfParser $parser
@param Tokenizer $tokenizer
@param StreamReader $reader
@return bool|self
@throws PdfTypeException
Parses an indirect object from a tokenizer parser and stream - reader .