配列をLazyArrayObjectに変換します。

@param	mixed	[$input]
@param	int		[$flags = 0]
@param	string	[$iterator_class = "ArrayIterator"]
@return	LazyArrayObject	変換後の配列
349709
public static function Create () {
		$args = func_num_args() === 0 ? [[]] : func_get_args();
		if ((isset($args[1]) || array_key_exists(1, $args)) && $args[1] === null) {
			unset($args[1]);
		} else {
			$args[1] = \ArrayObject::STD_PROP_LIST | \ArrayObject::ARRAY_AS_PROPS;
		}

		switch (count($args)) {
			case 3:
				return new static($args[0], $args[1], $args[2]);
			case 2:
				return new static($args[0], $args[1]);
			case 1:
				return new static($args[0]);
			default:
				return new static();
		}
	}
546145
public static function debugFromArray($input = null)
    {
        //====================================================================//
        // Safety Check
        if (is_null($input) || !self::isValid($input)) {
            return null;
        }
        //====================================================================//
        // return Encoded CheckSum
        return self::getDebug($input);
    }
749632
public static function createFromArray(array $input)
    {
        if (3 != count($input)) {
            throw new InvalidArgumentException(
                sprintf("%s() expects an array with exactly three elements", __METHOD__)
            );
        }
        if (array_key_exists('A', $input) && array_key_exists('B', $input) && array_key_exists('C', $input)) {
            return new self($input['A'], $input['B'], $input['C']);
        }
        return new self(array_shift($input), array_shift($input), array_shift($input));
    }
146265
public function sortByKeyFilter($input, $filter, $direction = SORT_ASC, $sort_flags = SORT_REGULAR)
    {
        return Utils::sortArrayByKey($input, $filter, $direction, $sort_flags);
    }
1006428
function iteratorToArray(iterator) {
        var data,
            result = [];

        while (!(data = iterator.next()).done) {
            result.push(data.value);
        }
        return result;
    }
882578
private function validateArrayImplementation(
        array $input,
        CaptureAggregatorInterface $captures,
        ErrorAggregatorInterface $errors
    ): void {
        list($indexMap, $serialized) = $this->getSerializedRules();

        $blocks = BlockSerializer::unserializeBlocks($serialized);

        // the method is expected to be implemented by a class that uses this trait
        $context = $this->createContextStorageFromBlocks($blocks);

        BlockInterpreter::executeStarts(
            BlockSerializer::unserializeBlocksWithStart($serialized),
            $blocks,
            $context,
            $errors
        );
        foreach ($input as $key => $value) {
            $blockIndex = $indexMap[$key];
            BlockInterpreter::executeBlock($value, $blockIndex, $blocks, $context, $captures, $errors);
        }
        BlockInterpreter::executeEnds(
            BlockSerializer::unserializeBlocksWithEnd($serialized),
            $blocks,
            $context,
            $errors
        );
    }
139849
public function getIterator()
    {
        if (!is_null($this->iterator)) {
            return $this->iterator;
        }

        return $this->iterator = new ArrayIterator((array) $this->value);
    }
1302873
public static function cast( $input, ?array $default = null, bool $deep = false ): ?array {
    if( !static::is( $input, true ) ) return $default;
    else {

      // handle simple cases to speed up the process
      if( !$deep ) {
        if( is_array( $input ) ) return $input;
        else if( $input instanceof \StdClass ) return (array) $input;
        else if( $input instanceof StorageInterface ) return $input->getArray( '' );
      }

      $tmp = [];
      foreach( $input as $k => $t ) {
        $tmp[ $k ] = $deep && static::is( $t, true ) ? static::cast( $t, null, $deep ) : $t;
      }

      return $tmp;
    }
  }
818869
public function getCachingIterator(int $flags = CachingIterator::CALL_TOSTRING): CachingIterator
    {
        return new CachingIterator($this->getIterator(), $flags);
    }
563541
private static function ucs4_ucs4array($input)
    {
        $output = array();

        $inp_len = strlen($input);
        // Input length must be dividable by 4
        if ($inp_len % 4) {
            throw new Exception('Input UCS4 string is broken');
        }
        // Empty input - return empty output
        if (!$inp_len) return $output;

        for ($i = 0, $out_len = -1; $i < $inp_len; ++$i) {
            if (!($i % 4)) { // Increment output position every 4 input bytes
                $out_len++;
                $output[$out_len] = 0;
            }
            $output[$out_len] += ord($input{$i}) << (8 * (3 - ($i % 4) ) );
        }
        return $output;
    }
1029356
function getArrayFromIterator(iterator) {
  let array = [],
      iteration;

  while ((iteration = iterator.next()) && !iteration.done) {
    array.push(iteration.value);
  }

  return array;
}
479055
public function unserialise($input, $class = null)
    {
        if(!is_array($input)) {
            $input = eval("return $input;");
        }
        
        if (!is_null($class)) {
            return (new Mapper())->map($input, $class);
        }

        return $input;
    }
1150105
function createArrayIterator(array, kind) {
  var object = toObject(array);
  var iterator = new ArrayIterator;
  iterator.iteratorObject_ = object;
  iterator.arrayIteratorNextIndex_ = 0;
  iterator.arrayIterationKind_ = kind;
  return iterator;
}
1049981
private function isEmptyArray($input)
    {
        if (!is_array($input)) {
            return false;
        }
        $empty = true;
        foreach (new RecursiveIteratorIterator(new RecursiveArrayIterator($input), RecursiveIteratorIterator::LEAVES_ONLY) as $key => $value) {
            $empty = (empty($value) && $value !== '0' && $value !== 0);
            if (!$empty) {
                return false;
            }
        }

        return $empty;
    }
688687
public function exchangeArray($input)
    {
        foreach ($input as $item) {
            $this->throwExceptionIfObjectIsNotInstanceOfTheClass($item);
        }

        parent::exchangeArray($input);
    }
73270
public static function typed(string $type, iterable $input = []): Set
    {
        $resolver = Resolver::typed($type);

        return new static($input, $resolver);
    }
655680
public static function indexArrayByValue($input, $value)
    {
        $output = [];
        foreach ($input as $row) {
            $output[$row->$value] = $row;
        }

        return $output;
    }