Purtle
Fast streaming RDF serializer for PHP
Loading...
Searching...
No Matches
Wikimedia\Purtle\BNodeLabeler Class Reference

Helper class for generating labels for blank nodes. More...

Public Member Functions

 __construct ( $prefix='genid', $start=1)
 
 getLabel ( $label=null)
 

Detailed Description

Helper class for generating labels for blank nodes.

This serves as a holder for the bnode counter that can be shared between multiple RdfWriter instances, to avoid conflicting ids.

@license GPL-2.0-or-later

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Purtle\BNodeLabeler::__construct ( $prefix = 'genid',
$start = 1 )
Parameters
string$prefix
int$start
Exceptions
InvalidArgumentException

Member Function Documentation

◆ getLabel()

Wikimedia\Purtle\BNodeLabeler::getLabel ( $label = null)
Parameters
string | null$labelnode label; will be generated if not given.
Returns
string

The documentation for this class was generated from the following file: