src/classes/CCArr.php
public static function object( $arr ) 
	{
		if( !is_array( $arr ) ) 
		{
			throw new \InvalidArgumentException("CCArr::object - only arrays can be passed.");
		}

		$object = new \stdClass();

		if ( !empty( $arr ) ) 
		{
			foreach ( $arr as $name => $value) 
			{
				if ( is_array( $value ) ) 
				{
					$value = static::object( $value );
				}
				$object->$name = $value;
			}
		}

		return $object;
	}
public static function object( $arr ) 
	{
		if( !is_array( $arr ) ) 
		{
			throw new \InvalidArgumentException("CCArr::object - only arrays can be passed.");
		}

		$object = new \stdClass();

		if ( !empty( $arr ) ) 
		{
			foreach ( $arr as $name => $value) 
			{
				if ( is_array( $value ) ) 
				{
					$value = static::object( $value );
				}
				$object->$name = $value;
			}
		}

		return $object;
	}
public static function object ( $ arr ) { if ( ! is_array ( $ arr ) ) { throw new \ InvalidArgumentException ( "CCArr::object - only arrays can be passed." ) ; } $ object = new \ stdClass ( ) ; if ( ! empty ( $ arr ) ) { foreach ( $ arr as $ name => $ value ) { if ( is_array ( $ value ) ) { $ value = static :: object ( $ value ) ; } $ object -> $ name = $ value ; } } return $ object ; }
create an object from an array

@param array		$array
@return object
create an object from an array