src/Micrometa/Infrastructure/Factory/ProfiledNamesFactory.php
protected static function consumeProfiledName(&$args, &$profile)
    {
        $profiledName          = new \stdClass();
        $profiledName->profile = $profile;

        // Get the first argument
        $arg = array_shift($args);

        // If it's not a scalar argument
        if (!is_scalar($arg)) {
            return self::consumeNonScalarProfiledName($arg, $profile);
        }

        if (($profile === false) && is_string(current($args))) {
            $profile = array_shift($args);
        }

        return self::createProfiledNameFromString(strval($arg), $profile);
    }
protected static function consumeProfiledName(&$args, &$profile)
    {
        $profiledName          = new \stdClass();
        $profiledName->profile = $profile;

        // Get the first argument
        $arg = array_shift($args);

        // If it's not a scalar argument
        if (!is_scalar($arg)) {
            return self::consumeNonScalarProfiledName($arg, $profile);
        }

        if (($profile === false) && is_string(current($args))) {
            $profile = array_shift($args);
        }

        return self::createProfiledNameFromString(strval($arg), $profile);
    }
protected static function consumeProfiledName ( & $ args , & $ profile ) { $ profiledName = new \ stdClass ( ) ; $ profiledName -> profile = $ profile ; // Get the first argument $ arg = array_shift ( $ args ) ; // If it's not a scalar argument if ( ! is_scalar ( $ arg ) ) { return self :: consumeNonScalarProfiledName ( $ arg , $ profile ) ; } if ( ( $ profile === false ) && is_string ( current ( $ args ) ) ) { $ profile = array_shift ( $ args ) ; } return self :: createProfiledNameFromString ( strval ( $ arg ) , $ profile ) ; }
Create a single profiled name by argument consumption

@param array $args                  Arguments
@param string|boolean|null $profile Profile

@return \stdClass Profiled name
Create a single profiled name by argument consumption