src/Micrometa/Infrastructure/Factory/ProfiledNamesFactory.php
public static function createFromArguments(array $args)
    {
        $profiledNames = [];
        $profile       = false;

        // Consume and register all given names and profiles
        while (count($args)) {
            $profiledNames[] = self::consumeProfiledName($args, $profile);
        }

        return new ProfiledNamesList($profiledNames);
    }
public static function createFromArguments(array $args)
    {
        $profiledNames = [];
        $profile       = false;

        // Consume and register all given names and profiles
        while (count($args)) {
            $profiledNames[] = self::consumeProfiledName($args, $profile);
        }

        return new ProfiledNamesList($profiledNames);
    }
public static function createFromArguments ( array $ args ) { $ profiledNames = [ ] ; $ profile = false ; // Consume and register all given names and profiles while ( count ( $ args ) ) { $ profiledNames [ ] = self :: consumeProfiledName ( $ args , $ profile ) ; } return new ProfiledNamesList ( $ profiledNames ) ; }
Create a list of profiled names from method arguments

The method takes an arbitrary number of arguments and tries to parse them as profiled names. Arguments
may be strings, arrays or objects.

String values are interpreted as names — with one exception: If the first two arguments are both strings,
the second one is taken as profile IRI. Optionally following string arguments are taken as names again,
assuming to share the same profile:

createFromArguments($name1 [, $profile])
createFromArguments($name1, $profile1, $name2, $profile2 ...)

Arrays arguments are expected to have at least one argument which is taken as name. If present, the
second argument is used as profile (otherwise an empty profile is assumed):

createFromArguments(array($name [, $profile]))

Object values are expected to have a "name" and an optional "profile" property:

createFromArguments((object)array('name' => $name [, 'profile' => $profile]))

When an array or object argument is consumed, the profile value will be used for any following string
argument. You can "reset" the profile to another value by specifying another array or object value in
this case.

createFromArguments(array($name1, $profile1), $name2, $name3 ...)

@param array $args Arguments

@return ProfiledNamesList Profiled names
@see Item::isOfType()
@see Item::getFirstProperty()
@see ItemList::getFirstItem()
@see ItemList::getItems()
Create a list of profiled names from method arguments