Skip to content
Jahuty's PHP client.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
src
tests
.codecov.yml
.gitignore
CHANGELOG.md
LICENSE
README.md
composer.json
phpcs.xml
phpunit.xml

README.md

CircleCI

snippets-php

Jahuty's PHP client.

Installation

This library requires PHP 7.3+.

It is multi-platform, and we strive to make it run equally well on Windows, Linux, and OSX.

It should be installed via Composer. To do so, add the following line to the require section of your composer.json file (where x is the latest major version), and run composer update:

{
   "require": {
       "jahuty/snippets-php": "^x"
   }
}

Usage

Use the key() method to set your API key (ideally, once during startup):

Snippet::key('123abc456def789ghi');

Then, use the get() method to retrieve a snippet (cast the return value to a string):

<!doctype html>
<html>
<head>
    <title>My awesome example</title>
</head>
<body>
    <?php echo Snippet::get(123); ?>
</body>

License

This library is licensed under the MIT license.

Compliance

This library strives to adhere to the following standards:

  1. Keep a Changelog 1.0
  2. PSR-2
  3. Semantic Versioning 2.0

If you spot an error, please let us know!

You can’t perform that action at this time.