PHPackages                             workofstan/backyard - 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. workofstan/backyard

ActiveLibrary

workofstan/backyard
===================

Library of useful functions and classes

v4.1.2.2(2mo ago)06.2k↓100%1MITPHPPHP &gt;=7.4 &lt;8.6CI passing

Since Nov 17Pushed 2mo agoCompare

[ Source](https://github.com/WorkOfStan/backyard)[ Packagist](https://packagist.org/packages/workofstan/backyard)[ Docs](https://github.com/WorkOfStan/backyard)[ RSS](/packages/workofstan-backyard/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (40)Used By (1)

Library In Backyard
===================

[](#library-in-backyard)

**Collection of useful functions**

[![Total Downloads](https://camo.githubusercontent.com/8d29ce529aeab9c461528535f9cd6ac53f845cf2422b381a02d3d8b92333c1d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f776f726b6f667374616e2f6261636b796172642e737667)](https://packagist.org/packages/workofstan/backyard)[![Latest Stable Version](https://camo.githubusercontent.com/e12ebad5d2d75c96a3e9059352a0f93a67fc5b55929b2992e46c7a0f9b1820a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776f726b6f667374616e2f6261636b796172642e737667)](https://packagist.org/packages/workofstan/backyard)[![Polish the code](https://github.com/WorkOfStan/backyard/actions/workflows/polish-the-code.yml/badge.svg)](https://github.com/WorkOfStan/backyard/actions/workflows/polish-the-code.yml)

Requirements
------------

[](#requirements)

- [PHP 5.3.0 or higher](http://www.php.net/) (i.e. not used \[\] instead of array() as this short syntax can be used only since PHP 5.4)
    - workofstan/backyard:^4.1.2.2 `php: >=7.4 =5.3,  5,       //log up to the level set here, default=5 = debug//logovat az do urovne zde uvedene: 0=unknown/default_call 1=fatal 2=error 3=warning 4=info 5=debug/default_setting 6=speed  //aby se zalogovala alespoň missing db musí být logování nejníže defaultně na 1 //1 as default for writing the missing db at least to the standard ErrorLog
        'mail_for_admin_enabled'    => false,   //fatal error may just be written in log //$backyardMailForAdminEnabled = "rejthar@gods.cz";//on production, it is however recommended to set an e-mail, where to announce fatal errors
        'error_log_message_type'    => 0,       //parameter message_type http://cz2.php.net/manual/en/function.error-log.php for my_error_log; default is 0, i.e. to send message to PHP's system logger; recommended is however 3, i.e. append to the file destination set either in field $this->BackyardConf['logging_file or in table system
        'logging_file'              => '',      //soubor, do kterého má my_error_log() zapisovat

        //logger relevant other
        'logging_level_name'        => array(0 => 'unknown', 1 => 'fatal', 'error', 'warning', 'info', 'debug', 'speed'),
        'logging_level_page_speed'  => 5,       //úroveň logování, do které má být zapisována rychlost vygenerování stránky
        'die_graciously_verbose'    => true,    //show details by die_graciously() on screen (it is always in the error_log); on production it is recommended to be set to to false due security
        'log_monthly_rotation'      => true,    //true, pokud má být přípona .log.Y-m.log (výhodou je měsíční rotace); false, pokud má být jen .log (výhodou je sekvenční zápis chyb přes my_error_log a jiných PHP chyb)
        'log_profiling_step'        => false,   //110812, my_error_log neprofiluje rychlost //$PROFILING_STEP = 0.008;//110812, my_error_log profiluje čas mezi dvěma měřenými body vyšší než udaná hodnota sec

        //geo relevant
        'geo_rough_distance_limit' => 1, //float //to quickly get rid off too distant POIs; 1 ~ 100km
        'geo_maximum_meters_from_poi' => 2500, //float //distance considered to be overlapping with the device position // 2500 m is considered exact location due to mobile phone GPS caching
        'geo_poi_list_table_name' => 'poi_list', //string //name of table with POI coordinates
    )
);
```

Notes
-----

[](#notes)

NB: BackyardMysqli creates no Backyard-&gt;Mysqli object (as e.g. `Backyard->Json` does) because it is not used by LIB itself and more importantly user of LIB may create any number of those. Example of usage:

```
$backyard = new WorkOfStan\Backyard\Backyard(array('logging_level' => 3));
$logger = $backyard->BackyardError;
$dbConnection = new WorkOfStan\Backyard\BackyardMysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE, $logger);
```

class BackyardBriefApiClient
----------------------------

[](#class-backyardbriefapiclient)

Very simple JSON RESTful API client. It just sends JSON and returns what is to be returned with few optional decorators and error logging.

- `sendJsonLoad` - sends JSON and returns whatever is returned with second OPTIONAL parameter with HTTP verb `GET`,`PUT`,`DELETE`
- `getJsonArray` - sends JSON and returns array decoded from response JSON
- `getArrayArray` - encode array to a JSON and returns array decoded from response JSON

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance94

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity93

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 85.5% 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 ~111 days

Recently: every ~42 days

Total

38

Last Release

62d ago

Major Versions

1.0 → v2.0.02015-11-19

v2.0.2 → v3.0.02016-07-03

v3.4.3 → v4.0.02024-11-25

PHP version history (6 changes)1.0PHP &gt;=5.3.0

v3.3.0PHP ^5.3 || ^7.0

v3.4.3PHP &gt;=5.3, &lt;7.4

v4.0.0PHP &gt;=7.4, &lt;=8.4

v4.1.0PHP &gt;=7.4, &lt;=8.5

v4.1.2PHP &gt;=7.4 &lt;8.6

### Community

Maintainers

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

---

Top Contributors

[![GodsDev](https://avatars.githubusercontent.com/u/2787653?v=4)](https://github.com/GodsDev "GodsDev (212 commits)")[![WorkOfStan](https://avatars.githubusercontent.com/u/26247074?v=4)](https://github.com/WorkOfStan "WorkOfStan (31 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/workofstan-backyard/health.svg)

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

PHPackages © 2026

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