2017 © Pedro PelĂĄez
 

library PHPClassNameGenerator

Generate PSR-0 compliant class names with ease

image

fzaninotto/PHPClassNameGenerator

Generate PSR-0 compliant class names with ease

  • Friday, May 25, 2012
  • by fzaninotto
  • Repository
  • 1 Watchers
  • 15 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PHPClassNameGenerator™: A PHP Class Name Generator

Generate PSR-0 compliant class names with ease., (*1)

Why Should I Use PHPClassNameGenerator™?

This library will help you if:, (*2)

  • You have written a great piece of code but you don't know where to contribute it
  • You would like to contribute to an existing open-source project but don't know what to do

Installation

Add the PHPClassNameGenerator™ library to your composer.json file:, (*3)

{
  "require": {
    "fzaninotto/PHPClassNameGenerator": "dev-master"
  }
}

Then use composer to complete the installation process., (*4)

Usage

Use the new ClassNameProvider class in combination with Faker to produce an infinite number of PSR-0 compliant class names., (*5)

<?php

require __DIR__ .'/vendor/autoload.php';

$faker = Faker\Factory::create();
$faker->addProvider(new PHPClassNameGenerator\ClassNameProvider($faker));
for ($i=0; $i < 20; $i++) {
    echo $faker->namespacedClassName, "\n";
}

This snippet generates 20 awesome class names. Here is an example output from PHPClassNameGenerator™:, (*6)

Assetic\History\XPath\ButtonAliasArgument
Symfony\Store\MissingCheckboxProcessIntrospectableOption
Doctrine\Resource\Client\FilterMockSet
Doctrine\Directory\ClientDumperErrorConstraint
Monolog\Radio\Form\AnnotationAliasAttribEscaperRadioRequest
Doctrine\Class\Error\Container\EngineTraceableDefinition
Symfony\Store\Scope\StoreProcessAnnotationNativeStorageWriter
Silex\Application\ClassPackage
Doctrine\Service\Kernel\ExceptionStoreForm
Assetic\Hash\Name\Input\KeyFileGeneratorStreamBag
Monolog\Response\BasicButton
Silex\Cookie\Input\AttributeRepeatedDepencencyInjectionProxy
Symfony\Resource\Access\StorageKernelLoaderPathEngine
Doctrine\Kernel\Session\ReferenceIntrospectableHelper
Symfony\Store\CombinedSuccessGenerator
Symfony\Cache\IdentityTimeShell
Doctrine\Path\Dialog\Filesystem\LayoutWarmableNodeElementJsonWarmer
Silex\Cookie\SplDataPackageStringException
Doctrine\Link\TreeHeaderOptionLoader
Symfony\Cookie\MandatoryOption

Contributing

PRs are, of course, welcome. Please respect the PSR-1 and PSR-2 standards., (*7)

Why Does PSR-0 Force Such Awful Class Names?

You tell me. I never asked for it. Now I can't code in PHP without an IDE anymore, and it's killing my RAD., (*8)

The Versions

25/05 2012

dev-master

9999999-dev https://github.com/fzaninotto/PHPClassNameGenerator

Generate PSR-0 compliant class names with ease

  Sources   Download

MIT

The Requires

 

by François Zaninotto