2015-10-05 16:54:25 -04:00
|
|
|
<?php
|
2015-11-16 11:40:01 -05:00
|
|
|
/**
|
|
|
|
* Ion
|
|
|
|
*
|
|
|
|
* Building blocks for web development
|
|
|
|
*
|
|
|
|
* @package Ion
|
|
|
|
* @author Timothy J. Warren
|
2016-01-04 16:58:33 -05:00
|
|
|
* @copyright Copyright (c) 2015 - 2016
|
2015-11-16 11:40:01 -05:00
|
|
|
* @license MIT
|
|
|
|
*/
|
2015-10-05 16:54:25 -04:00
|
|
|
|
|
|
|
namespace Aviat\Ion;
|
|
|
|
|
|
|
|
use Aviat\Ion\Type\ArrayType;
|
|
|
|
|
2015-10-14 09:20:52 -04:00
|
|
|
/**
|
|
|
|
* Wrapper to shortcut creating ArrayType objects
|
|
|
|
*/
|
2015-10-05 16:54:25 -04:00
|
|
|
trait ArrayWrapper {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Convenience method for wrapping an array
|
|
|
|
* with the array type class
|
|
|
|
*
|
|
|
|
* @param array $arr
|
|
|
|
* @return ArrayType
|
|
|
|
*/
|
|
|
|
public function arr(array $arr)
|
|
|
|
{
|
|
|
|
return new ArrayType($arr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// End of ArrayWrapper.php
|