Jenner\SimpleFork\Lock\Semaphore::_stringToSemKey PHP Method

_stringToSemKey() protected method

Semaphore requires a numeric value as the key
protected _stringToSemKey ( $identifier ) : integer
$identifier
return integer
    protected function _stringToSemKey($identifier)
    {
        $md5 = md5($identifier);
        $key = 0;
        for ($i = 0; $i < 32; $i++) {
            $key += ord($md5[$i]) * $i;
        }
        return $key;
    }