create an unique id for this calendar component object instance

@author Kjell-Inge Gustafsson <ical@kigkonsult.se>
@since 2.2.7 - 2007-09-04
@return void
175677
function _makeUid() {
    $date   = date('Ymd\THisT');
    $unique = substr(microtime(), 2, 4);
    $base   = 'aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPrRsStTuUvVxXuUvVwWzZ1234567890';
    $start  = 0;
    $end    = strlen( $base ) - 1;
    $length = 6;
    $str    = null;
    for( $p = 0; $p < $length; $p++ )
      $unique .= $base{mt_rand( $start, $end )};
    $this->uid['value']  = $date.'-'.$unique.'@'.$this->getConfig( 'unique_id' );
    $this->uid['params'] = null;
  }
925789
public function createIqId()
    {
      $iqId = $this->iqCounter;
      $this->iqCounter++;
      $id = dechex($iqId);

      return $id;
    }
124946
void registerId(final WComponent component) {
		if (!WebUtilities.isActiveNamingContext(this)) {
			throw new SystemException("Can only register a component on an active NamingContext");
		}

		// Get registered id names
		ComponentModel model = getOrCreateComponentModel();
		Map<String, WComponent> ids = model.getContextIds();
		if (ids == null) {
			ids = new HashMap<>();
			model.setContextIds(ids);
		}

		// Get id name
		String idName = component.getIdName();

		// Check if already used
		WComponent mapped = ids.get(idName);

		// Not in map
		if (mapped == null) {
			// Save ID / Component
			ids.put(idName, component);
		} else if (mapped != component) { // Check is same component
			String contextName = getId();
			throw new SystemException("Duplicate ID. ID \"" + idName + "\" for " + component.
					getClass().getName()
					+ " is already in use by " + mapped.getClass().getName() + " in context \"" + contextName + "\".");
		}

	}
1051367
public function duplicate($new_id = null)
    {
        $this->id = null;

        if ($this->id_field) {
            $this[$this->id_field] = $new_id;
        }

        return $this;
    }
97268
protected function makeSessionId()
    {
        $controller = property_exists($this, 'controller') && $this->controller
            ? $this->controller
            : $this;

        $uniqueId = method_exists($this, 'getId') ? $this->getId() : $controller->getId();

        // Removes Class name and "Controllers" directory
        $rootNamespace = Str::getClassId(Str::getClassNamespace(Str::getClassNamespace($controller)));

        // The controller action is intentionally omitted, session should be shared for all actions
        return 'widget.' . $rootNamespace . '-' . class_basename($controller) . '-' . $uniqueId;
    }
1176851
protected function create_name() {
		$format  = '%s';
		$format .= str_repeat( '[%s]', ( count( $this->args->keys ) - 1 ) );

		return $this->create_id_name( $format );
	}
694412
public function insert_id()
	{
		$query = version_compare($this->version(), '8', '>=')
			? 'SELECT SCOPE_IDENTITY() AS last_id'
			: 'SELECT @@IDENTITY AS last_id';

		$query = $this->query($query);
		$query = $query->row();
		return $query->last_id;
	}
1291931
protected function createAttendee() {
		$attendee = EventAttendee::create();
		$attendee->RegistrationID = $this->registration->ID;
		return $attendee;
	}
238896
def _set_unique_id(self, unique_id):
        """"""
        assert isinstance(unique_id, int), "unique_id must be an integer"

        if PolygonFilter.instace_exists(unique_id):
            newid = max(PolygonFilter._instance_counter, unique_id+1)
            msg = "PolygonFilter with unique_id '{}' exists.".format(unique_id)
            msg += " Using new unique id '{}'.".format(newid)
            warnings.warn(msg, FilterIdExistsWarning)
            unique_id = newid

        ic = max(PolygonFilter._instance_counter, unique_id+1)
        PolygonFilter._instance_counter = ic
        self.unique_id = unique_id
457938
public function updateId()
    {
        if (empty($this->parentNode->key)) {
            $this->id = "{$this->keyDelimiter}$this->key{$this->keyDelimiter}";
        } else {
            $this->id = "{$this->parentNode->id}$this->keyDelimiter{$this->key}$this->keyDelimiter";
        }
        $this->id = preg_replace('/[#]{2,}/', self::DEFAULT_KEY_DELIMITER, $this->id);
    }
1335787
protected function _addIdField() {
        $params = array(
            'type' => 'numeric',
            'editable' => false,
            'visible' => false,
            //  next to being primary, an extra index key is also needed,
            //  to enable the flexibility to modify primary keys.
            'index' => true
        );

        $params['primary'] = !$this->_primaryKeyFieldIsPresent();

        $this['inputs'] = array('id' => $params) + $this['inputs'];
    }
653759
private function generateId()
    {
        $randomNumber = mt_rand(0, mt_getrandmax());
        $ipAddressFragment = md5(substr($this->ipAddress, 0, 5));
        $timestamp = md5(microtime(true) . $this->now);

        return hash('sha256', $randomNumber . $ipAddressFragment . $this->salt . $timestamp);
    }
321838
protected function generateId()
    {
        $inputId = static::$idPrefix . $this->getName();
        if ($this->isMultiple()) {
            $inputId = "{$inputId}-{$this->instances}";
        }
        $this->setAttribute('id', $inputId);
        return $inputId;
    }
1147801
protected function get_filepicker_unique_id() : string {
        if (empty($this->filepickeruniqueid)) {
            $this->filepickeruniqueid = uniqid();
        }
        return $this->filepickeruniqueid;
    }
32075
public function unique(): self
    {
        // INFO: \array_unique() can't handle e.g. "stdClass"-values in an array

        $this->array = $this->reduce(
            static function ($resultArray, $value) {
                if (!\in_array($value, $resultArray, true)) {
                    $resultArray[] = $value;
                }

                return $resultArray;
            },
            []
        )->getArray();
        $this->generator = null;

        return $this;
    }
858884
public static function generateId()
    {
        $microtime         = microtime(true);
        $includeFloatMtime = str_replace(array('.', '.'), '', $microtime);
        $random            = mt_rand(1000, 8888);
        $uniqid            = ($includeFloatMtime + $random);
        return base_convert($uniqid, 10, 36);
    }
854387
private function createId($time = null)
    {
        $pid = getmypid();
        $inc = $this->readInc($pid);

        $id = $this->intToMaxLengthHex(null !== $time ? (int) $time : time(), 8);
        $id .= $this->intToMaxLengthHex(crc32(self::getHostname()), 6);
        $id .= $this->intToMaxLengthHex($pid, 4);
        $id .= $this->intToMaxLengthHex($inc, 6);

        return $id;
    }