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

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

        if (is_array($input) || $input instanceof ArrayObject) {
            return new ArrayMap($input);
        }

        if ($input instanceof ArrayAccess) {
            return new ArrayAccessMap($input);
        }

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

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

        if (is_array($input) || $input instanceof ArrayObject) {
            return new ArrayMap($input);
        }

        if ($input instanceof ArrayAccess) {
            return new ArrayAccessMap($input);
        }

        throw new CoreException('Unable to build Map');
    }
public static function toMap ( $ input ) { Arguments :: define ( Boa :: map ( ) ) -> check ( $ input ) ; if ( $ input instanceof MapInterface ) { return $ input ; } if ( is_array ( $ input ) || $ input instanceof ArrayObject ) { return new ArrayMap ( $ input ) ; } if ( $ input instanceof ArrayAccess ) { return new ArrayAccessMap ( $ input ) ; } throw new CoreException ( 'Unable to build Map' ) ; }
Wrap the provided value inside a Map.

@param array|ArrayObject|ArrayAccess|MapInterface $input

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