PHPackages                             ahsanshabbir/ttlock - 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. ahsanshabbir/ttlock

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

ahsanshabbir/ttlock
===================

debug

v2(3y ago)05Apache-2.0PHPPHP &gt;=7.2

Since Sep 16Pushed 3y agoCompare

[ Source](https://github.com/AhsanShabbir/ttlock)[ Packagist](https://packagist.org/packages/ahsanshabbir/ttlock)[ RSS](/packages/ahsanshabbir-ttlock/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (6)Used By (0)

TTLock-php-sdk
==============

[](#ttlock-php-sdk)

php sdk for TTLock

Install
-------

[](#install)

```
composer require hanwenbo/ttlock
```

使用
--

[](#使用)

```
use hanwenbo\ttlock;
...

$ttlock = new TTLock($clientId,$clientSecret);
// oauth2
$ttlock->oauth2->token($username,$password,$redirect_uri);
$ttlock->oauth2->refreshToken($refresh_token,$redirect_uri);

// date is  Current time (in millisecond)
$ttlock->user->register($username,$password,$date);
// Reset password
$ttlock->user->resetPassword($username,$password,$date);

$ttlock->user->list($startDate,$endDate,$pageNo,$pageSize,$date);
$ttlock->user->delete($username,$date);

// Lock
$ttlock->lock->initialize($lockData,$date,$lockAlias);
$ttlock->lock->list($pageNo,$pageSize,$date);
$ttlock->lock->listKey($lockId,$pageSize,$date);
$ttlock->lock->deleteAllKey($lockId,$date);
$ttlock->lock->listKeyboardPwd($lockId,$pageNo,$pageSize,$date);
$ttlock->lock->changeAdminKeyboardPwd($lockId,$password,$date);
$ttlock->lock->changeDeletePwd($lockId,$password,$date);
$ttlock->lock->rename($lockId,$lockAlias,$date);
$ttlock->lock->resetKey($lockId,$date);
$ttlock->lock->resetKeyboardPwd($lockId,$pwdInfo,$timestamp,$date);
$ttlock->lock->getKeyboardPwdVersion($lockId,$date);
$ttlock->lock->updateElectricQuantity($lockId,$electricQuantity,$date);
$ttlock->lock->transfer($receiverUsername,$lockIdList,$date);

// Passcode
$ttlock->passcode->get( int $lockId, int $keyboardPwdVersion, int $keyboardPwdType, int $startDate, int $endDate, int $date ) : array
$ttlock->passcode->delete( int $lockId, int $keyboardPwdId, int $deleteType, int $date ):array
$ttlock->passcode->change( int $lockId, int $keyboardPwdId, string $newKeyboardPwd, int $startDate, int $endDate, int $changeType, int $date ) : array
$ttlock->passcode->add( int $lockId, string $keyboardPwd, int $startDate, int $endDate, int $addType, int $date ) : array

// 其他接口本次开发没用上 后续有需要再完善

```

TODO
----

[](#todo)

- Result Model

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~346 days

Total

5

Last Release

1459d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51ca63158e294c47c700a50b64c0935aa66dea58684a8e2fadb54244ddaeff42?d=identicon)[AhsanShabbir](/maintainers/AhsanShabbir)

---

Top Contributors

[![hanwenbo](https://avatars.githubusercontent.com/u/5869741?v=4)](https://github.com/hanwenbo "hanwenbo (14 commits)")[![AhsanShabbir](https://avatars.githubusercontent.com/u/13930306?v=4)](https://github.com/AhsanShabbir "AhsanShabbir (4 commits)")

---

Tags

ttlock

### Embed Badge

![Health badge](/badges/ahsanshabbir-ttlock/health.svg)

```
[![Health](https://phpackages.com/badges/ahsanshabbir-ttlock/health.svg)](https://phpackages.com/packages/ahsanshabbir-ttlock)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k40](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[oat-sa/tao-core

TAO core extension

66143.7k120](/packages/oat-sa-tao-core)

PHPackages © 2026

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