Documentation

Class Phalcon\Snowflake

Source on GitHub

<?php

  $snowflake = new Phalcon\Snowflake;
  $id = $snowflake->nextId();
  $desc = $snowflake->parse($id);

Methods

public nextId ()

Returns a unique id value generated by the snowflake

<?php

  $snowflake = new \Phalcon\Snowflake;
  $id = $snowflake->nextId();

public parse (unknown $id)

Parse a unique id value

<?php

  $snowflake = new \Phalcon\Snowflake;
  $desc = $snowflake->parse($id);

public static parseID (unknown $id)

Parse a unique id value

<?php

  $desc = \Phalcon\Snowflake::parseID($id);