2017 © Pedro Peláez
 

library app-meta

BEAR.Sunday application meta information

image

bear/app-meta

BEAR.Sunday application meta information

  • Friday, May 11, 2018
  • by koriym
  • Repository
  • 2 Watchers
  • 0 Stars
  • 30,471 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 21 Versions
  • 8 % Grown

The README.md

BEAR.AppMeta

Scrutinizer Code Quality Code Coverage Build Status, (*1)

BEAR.AppMeta is a lightweight library for managing application metadata in PHP. It provides a simple way to access application directory paths and resource metadata, making it easier to organize and retrieve essential information about your application., (*2)


Features

  • Application Metadata Management: Retrieve directory paths such as appDir, logDir, and tmpDir with ease.
  • Resource Metadata Generator: Use a generator to efficiently fetch metadata for resources in your application.

Usage

Accessing Application Metadata

The Meta class provides access to application metadata, including directory paths:, (*3)

use BEAR\AppMeta\Meta;

// Initialize with your application's namespace
$appMeta = new Meta('MyVendor\HelloWorld');

// Access metadata properties
echo $appMeta->name;    // MyVendor\HelloWorld
echo $appMeta->appDir;  // /path/to/MyVendor/HelloWorld/src
echo $appMeta->logDir;  // /path/to/MyVendor/HelloWorld/var/log
echo $appMeta->tmpDir;  // /path/to/MyVendor/HelloWorld/var/tmp

Fetching Resource Metadata

Use the getGenerator() method to retrieve metadata for resources. This method returns a generator, making it memory-efficient for large applications., (*4)

// Fetch metadata for all resources
foreach ($appMeta->getGenerator('*') as $resourceMeta) {
    var_dump($resourceMeta->uriPath); // app://self/one
    var_dump($resourceMeta->class);   // FakeVendor\HelloWorld\Resource\App\One
    var_dump($resourceMeta->file);    // /path/to/src/Resource/App/One.php
}

// Fetch metadata for resources in the 'app' namespace
foreach ($appMeta->getGenerator('app') as $resourceMeta) {
    var_dump($resourceMeta->uriPath); // /one
    var_dump($resourceMeta->class);   // FakeVendor\HelloWorld\Resource\App\One
    var_dump($resourceMeta->file);    // /path/to/src/Resource/App/One.php
}

The Versions

11/05 2018

1.x-dev

1.9999999.9999999.9999999-dev

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

11/05 2018

1.4.0

1.4.0.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

18/03 2018

1.3.0

1.3.0.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

06/02 2018

1.2.5

1.2.5.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

24/07 2017

1.2.4

1.2.4.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

24/07 2017

1.2.3

1.2.3.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

13/07 2017

1.2.1

1.2.1.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

13/07 2017

1.2.2

1.2.2.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

31/05 2017

1.2.0

1.2.0.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

31/05 2017

dev-cleanup

dev-cleanup

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

31/05 2017

dev-spike

dev-spike

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

24/03 2017

1.1.1

1.1.1.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

16/03 2017

1.1.0

1.1.0.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

19/05 2015

1.0.0

1.0.0.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

The Development Requires

bear.sunday

08/05 2015

0.4.0

0.4.0.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

bearsunday

01/05 2015

0.3.3

0.3.3.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

bearsunday

28/04 2015

0.3.2

0.3.2.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

bearsunday

28/04 2015

0.3.1

0.3.1.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

bearsunday

28/04 2015

0.3.0

0.3.0.0

BEAR.Sunday application meta information

  Sources   Download

MIT

The Requires

 

bearsunday

17/02 2015

0.1.1

0.1.1.0

BEAR.Sunday application meta information

  Sources   Download

BSD-3-Clause

The Requires

 

bearsunday

17/02 2015

0.1.0

0.1.0.0

BEAR.Sunday application meta information

  Sources   Download

BSD-3-Clause

The Requires

 

bearsunday