library namespacery
A library to help parse namespaces
xenolope/namespacery
A library to help parse namespaces
- Sunday, October 26, 2014
- by jonjomckay
- Repository
- 1 Watchers
- 0 Stars
- 15 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 4 Versions
- 0 % Grown
Namespacery
, (*1)
Namespacery is a simple PHP library to help parse namespaces in an easily-accessible way., (*2)
Installation
The library can be installed with Composer, by including the following in your composer.json
:, (*3)
{
"require": {
"xenolope/namespacery": "0.*"
}
}
Usage
$resolver = new \Xenolope\Namespacery('Vendor\Package\Group\Class');
// Returns the value of the first namespace segment
$resolver->parseSegments()->getFirstSegment();
// Returns the value of the last namespace segment
$resolver->parseSegments()->getLastSegment();
// Returns the value of the segment at the given index, or an \OutOfBoundsException if the index doesn't exist
$resolver->parseSegments()->getSegment(1);
// Returns an array of all segments in the namespace
$resolver->parseSegments()->getSegments();
License
Namespacery is released under the MIT License; please see LICENSE for more information., (*4)
dev-master
9999999-dev
A library to help parse namespaces
Sources
Download
MIT
The Requires
The Development Requires
dev-develop
dev-develop
A library to help parse namespaces
Sources
Download
MIT
The Requires
The Development Requires
v0.6
0.6.0.0
A library to help parse namespaces
Sources
Download
MIT
The Requires
The Development Requires
v0.5
0.5.0.0
A library to help parse namespaces
Sources
Download
MIT
The Requires
The Development Requires