PHPackages                             lebato/snowflake-sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lebato/snowflake-sdk-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lebato/snowflake-sdk-php
========================

This API used to generate universal unique identification number.

08PHP

Since May 4Pushed 8y ago1 watchersCompare

[ Source](https://github.com/lebato/snowflake-sdk-php)[ Packagist](https://packagist.org/packages/lebato/snowflake-sdk-php)[ RSS](/packages/lebato-snowflake-sdk-php/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Getting started
===============

[](#getting-started)

This API used to generate universal unique identification number.

How to Build
------------

[](#how-to-build)

The generated code has dependencies over external libraries like UniRest. These dependencies are defined in the `composer.json` file that comes with the SDK. To resolve these dependencies, we use the Composer package manager which requires PHP greater than 5.3.2 installed in your system. Visit  to download the installer file for Composer and run it in your system. Open command prompt and type `composer --version`. This should display the current version of the Composer installed if the installation was successful.

- Using command line, navigate to the directory containing the generated files (including `composer.json`) for the SDK.
- Run the command `composer install`. This should install all the required dependencies and create the `vendor` directory in your project directory.

[![Building SDK - Step 1](https://camo.githubusercontent.com/037fa4ba19e003d7e731dff2c7381410f2407bb82e28c88237c7835009174ad7/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d696e7374616c6c446570656e64656e6369657326776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/037fa4ba19e003d7e731dff2c7381410f2407bb82e28c88237c7835009174ad7/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d696e7374616c6c446570656e64656e6369657326776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

### \[For Windows Users Only\] Configuring CURL Certificate Path in php.ini

[](#for-windows-users-only-configuring-curl-certificate-path-in-phpini)

CURL used to include a list of accepted CAs, but no longer bundles ANY CA certs. So by default it will reject all SSL certificates as unverifiable. You will have to get your CA's cert and point curl at it. The steps are as follows:

1. Download the certificate bundle (.pem file) from  on to your system.
2. Add curl.cainfo = "PATH\_TO/cacert.pem" to your php.ini file located in your php installation. “PATH\_TO” must be an absolute path containing the .pem file.

```
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
;curl.cainfo =
```

How to Use
----------

[](#how-to-use)

The following section explains how to use the SnowflakeAPI library in a new project.

### 1. Open Project in an IDE

[](#1-open-project-in-an-ide)

Open an IDE for PHP like PhpStorm. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.

[![Open project in PHPStorm - Step 1](https://camo.githubusercontent.com/3ed1fd18bad565bf39b9cc0da55840beb4acb77dece4e65d456e8a03c2be3867/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e49444526776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/3ed1fd18bad565bf39b9cc0da55840beb4acb77dece4e65d456e8a03c2be3867/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e49444526776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

Click on `Open` in PhpStorm to browse to your generated SDK directory and then click `OK`.

[![Open project in PHPStorm - Step 2](https://camo.githubusercontent.com/210f228962f232eb758c9061373ed0edb0258ff23f588bbee33f9ac734001390/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e50726f6a6563743026776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/210f228962f232eb758c9061373ed0edb0258ff23f588bbee33f9ac734001390/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e50726f6a6563743026776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

### 2. Add a new Test Project

[](#2-add-a-new-test-project)

Create a new directory by right clicking on the solution name as shown below:

[![Add a new project in PHPStorm - Step 1](https://camo.githubusercontent.com/8920dbe9aabd53d477bf23fbeb5be1bbb3c7a90ca87d3cb0945d6fdf7459cef3/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6372656174654469726563746f727926776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/8920dbe9aabd53d477bf23fbeb5be1bbb3c7a90ca87d3cb0945d6fdf7459cef3/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6372656174654469726563746f727926776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

Name the directory as "test"

[![Add a new project in PHPStorm - Step 2](https://camo.githubusercontent.com/6f2561995b03f822811956708cf43b678b74cdb5a21d2fcb2f5cb9faaf30a247/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d654469726563746f727926776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/6f2561995b03f822811956708cf43b678b74cdb5a21d2fcb2f5cb9faaf30a247/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d654469726563746f727926776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

Add a PHP file to this project

[![Add a new project in PHPStorm - Step 3](https://camo.githubusercontent.com/24c64ec5ea5e3c5f0ad0f223e8bbac068974b57b99f5964d7043f6b8d73197bc/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d63726561746546696c6526776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/24c64ec5ea5e3c5f0ad0f223e8bbac068974b57b99f5964d7043f6b8d73197bc/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d63726561746546696c6526776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

Name it "testSDK"

[![Add a new project in PHPStorm - Step 4](https://camo.githubusercontent.com/f26645c3f1513414cae6569edfe68a5917bcf78c9cb666792224c75139b9ccac/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d6546696c6526776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/f26645c3f1513414cae6569edfe68a5917bcf78c9cb666792224c75139b9ccac/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6e616d6546696c6526776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

Depending on your project setup, you might need to include composer's autoloader in your PHP code to enable auto loading of classes.

```
require_once "../vendor/autoload.php";
```

It is important that the path inside require\_once correctly points to the file `autoload.php` inside the vendor directory created during dependency installations.

[![Add a new project in PHPStorm - Step 4](https://camo.githubusercontent.com/16fb7d0b23d1fea7ae5543836010ed3ec458b31e2c6ea9c95fe613a461208912/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d70726f6a65637446696c657326776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/16fb7d0b23d1fea7ae5543836010ed3ec458b31e2c6ea9c95fe613a461208912/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d70726f6a65637446696c657326776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

After this you can add code to initialize the client library and acquire the instance of a Controller class. Sample code to initialize the client library and using controller methods is given in the subsequent sections.

### 3. Run the Test Project

[](#3-run-the-test-project)

To run your project you must set the Interpreter for your project. Interpreter is the PHP engine installed on your computer.

Open `Settings` from `File` menu.

[![Run Test Project - Step 1](https://camo.githubusercontent.com/14a7e3161fd30aa4633fd0e6be7a629df1e8ce546ead51df5acac6f54217855f/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e53657474696e677326776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/14a7e3161fd30aa4633fd0e6be7a629df1e8ce546ead51df5acac6f54217855f/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d6f70656e53657474696e677326776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

Select `PHP` from within `Languages & Frameworks`

[![Run Test Project - Step 2](https://camo.githubusercontent.com/cfda223e163b7b8ff634aeae1b42285720bea48fb1e8b40aff6b657c4fcd8868/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723026776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/cfda223e163b7b8ff634aeae1b42285720bea48fb1e8b40aff6b657c4fcd8868/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723026776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

Browse for Interpreters near the `Interpreter` option and choose your interpreter.

[![Run Test Project - Step 3](https://camo.githubusercontent.com/8c7372dd4fc6ffafc292e9b7b435cbc1c8d5d2f4cec16767749c92f7ea1ab87e/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723126776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/8c7372dd4fc6ffafc292e9b7b435cbc1c8d5d2f4cec16767749c92f7ea1ab87e/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723126776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

Once the interpreter is selected, click `OK`

[![Run Test Project - Step 4](https://camo.githubusercontent.com/bced720bced82902799606b506292eac024a8d77f9fe3dcb84ebd751419b14b4/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723226776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/bced720bced82902799606b506292eac024a8d77f9fe3dcb84ebd751419b14b4/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d736574496e7465727072657465723226776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

To run your project, right click on your PHP file inside your Test project and click on `Run`

[![Run Test Project - Step 5](https://camo.githubusercontent.com/0d75841838c9248c463a782ff436bc2e3f4c739ff65021c29796d0583290544c/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d72756e50726f6a65637426776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)](https://camo.githubusercontent.com/0d75841838c9248c463a782ff436bc2e3f4c739ff65021c29796d0583290544c/68747470733a2f2f617069646f63732e696f2f696c6c757374726174696f6e2f7068703f737465703d72756e50726f6a65637426776f726b7370616365466f6c6465723d536e6f77666c616b652532304150492d504850)

How to Test
-----------

[](#how-to-test)

Unit tests in this SDK can be run using PHPUnit.

1. First install the dependencies using composer including the `require-dev` dependencies.
2. Run `vendor\bin\phpunit --verbose` from commandline to execute tests. If you have installed PHPUnit globally, run tests using `phpunit --verbose` instead.

You can change the PHPUnit test configuration in the `phpunit.xml` file.

Initialization
--------------

[](#initialization)

API client can be initialized as following.

```
$client = new SnowflakeAPILib\SnowflakeAPIClient();
```

Class Reference
===============

[](#class-reference)

List of Controllers
------------------------------------------------------------------

[](#list-of-controllers)

- [APIController](#api_controller)

[![Class: ](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67 ".APIController")](https://camo.githubusercontent.com/ec8022a6fb768aa7d81b8226237aadf63b8a726efab75a8314b224e54194c885/68747470733a2f2f617069646f63732e696f2f696d672f636c6173732e706e67) APIController
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-apicontroller)

### Get singleton instance

[](#get-singleton-instance)

The singleton instance of the `APIController` class can be accessed from the API Client.

```
$client = $client->getClient();
```

### [![Method: ](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67 ".APIController.getIdGet")](https://camo.githubusercontent.com/501a7bfa57a34ebbde43bfe00d7218a47c0a18eae15acb62480b8716f604ee87/68747470733a2f2f617069646f63732e696f2f696d672f6d6574686f642e706e67) getIdGet

[](#-getidget)

> *Tags:* `Skips Authentication`

> Base on Twitter Snowflake algorithm.

```
function getIdGet()
```

#### Example Usage

[](#example-usage)

```
$result = $client->getIdGet();
```

[Back to List of Controllers](#list_of_controllers)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d5b5774cd92283808a3d069dc57dba7f920f3078e80d170786311e3e89478be9?d=identicon)[huyhvq](/maintainers/huyhvq)

### Embed Badge

![Health badge](/badges/lebato-snowflake-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/lebato-snowflake-sdk-php/health.svg)](https://phpackages.com/packages/lebato-snowflake-sdk-php)
```

###  Alternatives

[izica/phalcon-meta-tags

Phalcon PHP Meta tags service

1215.9k](/packages/izica-phalcon-meta-tags)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
