public function processData(array $data, $expand = FALSE)
	{
		$return = [];

		foreach ($data as $key => $item) {
			list($modified, $key) = $this->doubledModifier($key, '%');

			if ($modified && preg_match('#^(.*)%(\w+(?:\[\])?)$#', $key, $parts)) {
				$key = $parts[1];
				$item = $this->processModifier($parts[2], $item);
			} elseif ($item instanceof \DateTime || $item instanceof \DateTimeImmutable) {
				$item = $this->processModifier('dt', $item);
			} elseif (is_array($item)) {
				$item = $this->processData($item);
			}

			if ($expand && strpos($key, '.') !== FALSE) {
				Helpers::expandRow($return, $key, $item);
			} else {
				$return[$key] = $item;
			}
		}

		return $return;
	}
public function processData(array $data, $expand = FALSE)
	{
		$return = [];

		foreach ($data as $key => $item) {
			list($modified, $key) = $this->doubledModifier($key, '%');

			if ($modified && preg_match('#^(.*)%(\w+(?:\[\])?)$#', $key, $parts)) {
				$key = $parts[1];
				$item = $this->processModifier($parts[2], $item);
			} elseif ($item instanceof \DateTime || $item instanceof \DateTimeImmutable) {
				$item = $this->processModifier('dt', $item);
			} elseif (is_array($item)) {
				$item = $this->processData($item);
			}

			if ($expand && strpos($key, '.') !== FALSE) {
				Helpers::expandRow($return, $key, $item);
			} else {
				$return[$key] = $item;
			}
		}

		return $return;
	}
public function processData ( array $ data , $ expand = FALSE ) { $ return = [ ] ; foreach ( $ data as $ key => $ item ) { list ( $ modified , $ key ) = $ this -> doubledModifier ( $ key , '%' ) ; if ( $ modified && preg_match ( '#^(.*)%(\w+(?:\[\])?)$#' , $ key , $ parts ) ) { $ key = $ parts [ 1 ] ; $ item = $ this -> processModifier ( $ parts [ 2 ] , $ item ) ; } elseif ( $ item instanceof \ DateTime || $ item instanceof \ DateTimeImmutable ) { $ item = $ this -> processModifier ( 'dt' , $ item ) ; } elseif ( is_array ( $ item ) ) { $ item = $ this -> processData ( $ item ) ; } if ( $ expand && strpos ( $ key , '.' ) !== FALSE ) { Helpers :: expandRow ( $ return , $ key , $ item ) ; } else { $ return [ $ key ] = $ item ; } } return $ return ; }
Formats data types by modifiers
@param array ['name' => 'roman', 'age%i' => '27', 'numbers%i[]' => ['1', 2, 2.3]]
@return array
Formats data types by modifiers