2017 © Pedro Peláez
 

library classfunctions

Functions to manipulate class names

image

mathiasverraes/classfunctions

Functions to manipulate class names

  • Monday, December 28, 2015
  • by mathiasverraes
  • Repository
  • 3 Watchers
  • 31 Stars
  • 65,482 Installations
  • PHP
  • 10 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 9 % Grown

The README.md

ClassFunctions

PHP Utilities to get different variations of class names, (*1)

use Verraes\ClassFunctions;

// Fully qualified class name of an object, without a leading backslash
ClassFunctions\fqcn($object);

// Canonical class name of an object, of the form "My.Namespace.MyClass"
ClassFunctions\canonical($object);

// Underscored and lowercased class name of an object, of the form "my.namespace.my_class"
ClassFunctions\underscore($object);

// The class name of an object, without the namespace
ClassFunctions\short($object);

The above methods also accept strings, and ClassFunctions\fqcn() accepts a canonical class name as returned from ClassFunctions\canonical()., (*2)

Free bonus feature:, (*3)

// Returns an associative array of 'CONSTANT_NAME' => 'value'
ClassFunctions\constants('Verraes\ClassFunctions\Tests\MyClass')

Installation

You can install ClassFunctions with Composer:, (*4)

composer require mathiasverraes/classfunctions

Run composer install or composer update and you're ready to start., (*5)

The Versions

28/12 2015

dev-master

9999999-dev http://verraes.net

Functions to manipulate class names

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

classes utilities

28/07 2014

1.1.0

1.1.0.0 http://verraes.net

Functions to manipulate class names

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

classes utilities

06/02 2014

1.0.1

1.0.1.0 http://verraes.net

Functions to manipulate class names

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

classes utilities

06/02 2014

1.0.0

1.0.0.0 http://verraes.net

Functions to manipulate class names

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

classes utilities