PHPackages                             anekdotes/meta - 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. anekdotes/meta

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

anekdotes/meta
==============

Contains utility classes meant to reference themselves and manipulate events/storage

2.0.0(4y ago)0493MITPHPPHP &gt;=7.4.0

Since May 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/anekdotes/meta)[ Packagist](https://packagist.org/packages/anekdotes/meta)[ RSS](/packages/anekdotes-meta/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

Anekdotes Meta
==============

[](#anekdotes-meta)

[![Latest Stable Version](https://camo.githubusercontent.com/8def4c422d9bf86721f540f4c75c7a5e7da0254a6259fd74dde2acd193345909/68747470733a2f2f706f7365722e707567782e6f72672f616e656b646f7465732f6d6574612f762f737461626c65)](https://packagist.org/packages/anekdotes/meta)[![Build Status](https://camo.githubusercontent.com/43c022e9784c379cd4cb317537368a2b3b8ea28d9f8bbd5ce47a7c506c5e7ba3/68747470733a2f2f7472617669732d63692e6f72672f616e656b646f7465732f6d6574612e737667)](https://travis-ci.org/anekdotes/meta)[![codecov.io](https://camo.githubusercontent.com/3a524e6a4b665347592f60461961842af5013f9113960ac8880c3c0eff45583c/68747470733a2f2f636f6465636f762e696f2f6769746875622f616e656b646f7465732f6d6574612f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/anekdotes/meta?branch=master)[![StyleCI](https://camo.githubusercontent.com/96f6d5b41fde75c9c0738d000b66e73e8a208057295029dca9c73a816d608b62/68747470733a2f2f7374796c6563692e696f2f7265706f732f35373930393339342f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/57909394)[![License](https://camo.githubusercontent.com/4c90b50be6f91ef31d751056bac96e05cd13cbbd6bf85526c61c14b161e6cd59/68747470733a2f2f706f7365722e707567782e6f72672f616e656b646f7465732f6d6574612f6c6963656e7365)](https://packagist.org/packages/anekdotes/meta)[![Total Downloads](https://camo.githubusercontent.com/84d8469c49004b5a5f6d2592d3375957e7004fa649384af2ac2580e5f8fffc72/68747470733a2f2f706f7365722e707567782e6f72672f616e656b646f7465732f6d6574612f646f776e6c6f616473)](https://packagist.org/packages/anekdotes/meta)[![Codacy Badge](https://camo.githubusercontent.com/04a2dd3d6801c0b4c24cd68410ae089b98e1456d9a9b9a94d41e007dc621743c/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3138653833373661373338633466326338303433626662396264613537643930)](https://www.codacy.com/app/steve-gagnev4si/meta?utm_source=github.com&utm_medium=referral&utm_content=anekdotes/meta&utm_campaign=Badge_Grade)

Contains utility classes meant to reference themselves and manipulate events/storage

Installation
------------

[](#installation)

Install via composer into your project:

```
composer require anekdotes/meta

```

Basic Usage
-----------

[](#basic-usage)

Call the namespace of the object you want to use and use its functions. There are many utilities classes to choose from, described below:

Registry
--------

[](#registry)

A data storage class. Meant to be extended and to load arrays in dot notation.

```
use Anekdotes\Meta\Registry
$registry = new Registry();
$registry->load(["toaster.test" => "Test","toaster.toast" => "Toast","testing.test" => "Tested"]);
$registry->get("testing.test"); //Returns "Tested"
$registry->group("toaster"); //Returns ["test" => "Test","toast" = "Toast"]
$registry->has("testing.test"); //Checks if key exists. Returns true.
```

Additional functions to manipulate registries can be found in the source code

StaticRegistry
--------------

[](#staticregistry)

The StaticRegistry is a Singleton instance of the Registry.

```
use Anekdotes\Meta\StaticRegistry
StaticRegistry::load(["toaster.test" => "Test"]);
```

Config
------

[](#config)

A file loader that fills a registry based on the file content.

```
use Anekdotes\Meta\Config
$config = new Config();
$path = "app/config/config.php";
$config->loadFile($path);
```

It can also load folder of config files.

```
$config = new Config();
$path = "app/config";
$config->loadFolder($path);
```

Files must use the following format :

```
