* @package generis */ class Bin2HexUriProvider extends ConfigurableService implements UriProvider { const OPTION_NAMESPACE = 'namespace'; /** * Generates a URI based on a serial stored in the database. * * @access public * @author Jerome Bogaerts, * @return string * @throws UriProviderException */ public function provide() { return $this->getOption(self::OPTION_NAMESPACE) . uniqid('i') . getmypid() . bin2hex(openssl_random_pseudo_bytes(8)); } }