src/Micrometa/Application/Factory/AliasFactory.php
public function createAliases($name)
    {
        $aliases = [$name];

        // Sanitize the name if it isn't usable as PHP function name
        if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name)) {
            $name      = preg_replace('/^[^a-zA-Z_\x7f-\xff]+(.*)?/', '$1', $name);
            $aliases[] = lcfirst(
                implode(
                    '',
                    array_map('ucfirst', preg_split('/[^a-zA-Z0-9_\x7f-\xff]+/', $name))
                )
            );
        }

        return $aliases;
    }
public function createAliases($name)
    {
        $aliases = [$name];

        // Sanitize the name if it isn't usable as PHP function name
        if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name)) {
            $name      = preg_replace('/^[^a-zA-Z_\x7f-\xff]+(.*)?/', '$1', $name);
            $aliases[] = lcfirst(
                implode(
                    '',
                    array_map('ucfirst', preg_split('/[^a-zA-Z0-9_\x7f-\xff]+/', $name))
                )
            );
        }

        return $aliases;
    }
public function createAliases ( $ name ) { $ aliases = [ $ name ] ; // Sanitize the name if it isn't usable as PHP function name if ( ! preg_match ( '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/' , $ name ) ) { $ name = preg_replace ( '/^[^a-zA-Z_\x7f-\xff]+(.*)?/' , '$1' , $ name ) ; $ aliases [ ] = lcfirst ( implode ( '' , array_map ( 'ucfirst' , preg_split ( '/[^a-zA-Z0-9_\x7f-\xff]+/' , $ name ) ) ) ) ; } return $ aliases ; }
Create aliases for a particular name

@param string $name Name

@return string[] Name aliases (including the name itself as first item)
Create aliases for a particular name