Registry / utility / dragon-code-contracts

dragon-code-contracts

JSON →
library2.25.0phppackagistunverified

A set of contracts for any project providing interfaces and abstractions.

composer require dragon-code/contracts
INSTALL
IMPORT
SIG · DRAGON-CODE-CONTRA
D
dragon-code-contracts
utilityphpv2.25.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Arrayable
use DragonCode\Contracts\Support\Arrayable;

Implement the Arrayable contract to convert an object to an array.

<?php require 'vendor/autoload.php'; use DragonCode\Contracts\Support\Arrayable; class MyClass implements Arrayable { public function toArray(): array { return ['key' => 'value']; } } $obj = new MyClass(); print_r($obj->toArray());
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.25.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
dragon-code-contracts — pip install dragon-code-contracts · libregistry