src/SellerLabs/Nucleus/Data/Factories/ComplexFactory.php
public static function toReadMap($input)
    {
        Arguments::define(Boa::readMap())->check($input);

        if ($input instanceof ReadMapInterface) {
            return $input;
        }

        if (is_array($input)
            || $input instanceof ArrayObject
            || $input instanceof ArrayAccess
        ) {
            return static::toMap($input);
        }

        if ($input instanceof Traversable) {
            return new TraversableLeftFoldable($input);
        }

        throw new CoreException('Unable to build ReadMap');
    }
public static function toReadMap($input)
    {
        Arguments::define(Boa::readMap())->check($input);

        if ($input instanceof ReadMapInterface) {
            return $input;
        }

        if (is_array($input)
            || $input instanceof ArrayObject
            || $input instanceof ArrayAccess
        ) {
            return static::toMap($input);
        }

        if ($input instanceof Traversable) {
            return new TraversableLeftFoldable($input);
        }

        throw new CoreException('Unable to build ReadMap');
    }
public static function toReadMap ( $ input ) { Arguments :: define ( Boa :: readMap ( ) ) -> check ( $ input ) ; if ( $ input instanceof ReadMapInterface ) { return $ input ; } if ( is_array ( $ input ) || $ input instanceof ArrayObject || $ input instanceof ArrayAccess ) { return static :: toMap ( $ input ) ; } if ( $ input instanceof Traversable ) { return new TraversableLeftFoldable ( $ input ) ; } throw new CoreException ( 'Unable to build ReadMap' ) ; }
Wrap the provided value inside a ReadMap.

@param array|ArrayObject|ArrayAccess|Traversable|ReadMapInterface  $input

@return ArrayAccessMap|ArrayList|TraversableLeftFoldable
@throws CoreException
@throws InvalidArgumentException
Wrap the provided value inside a ReadMap .