You are here

public static function EasyRdf_Literal_HexBinary::fromBinary in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/HexBinary.php \EasyRdf_Literal_HexBinary::fromBinary()

Constructor for creating a new literal object from a binary blob

Parameters

string $binary The binary data:

Return value

object EasyRdf_Literal_HexBinary

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/HexBinary.php, line 76

Class

EasyRdf_Literal_HexBinary
Class that represents an RDF Literal of datatype xsd:hexBinary

Code

public static function fromBinary($binary) {
  return new self(bin2hex($binary));
}