@inheritdoc

@throws ExtractorException
@param \core_kernel_classes_Resource[] $items
@return string
508204
public function export(array $items = null)
    {
        if (empty($items)) {
            $items = $this->getItems();
        }

        $data = $this->getDataByItems($items);

        return $this->save($this->headers, $data);
    }
1286313
public static function toResults(array $items) {

        $output = [];

        foreach ($items as $current) {

            if (false === ($current instanceof Select2ItemInterface)) {
                throw new InvalidArgumentException("The item must implements Select2ItemInterface");
            }

            $output[] = [
                "id"   => $current->getSelect2ItemId(),
                "text" => $current->getSelect2ItemText(),
            ];
        }

        return $output;
    }
1163649
private static function writeItemsToResource(
        $resource,
        array $items
    ) {
        foreach ($items as $item) {
            fputcsv($resource, [
                $item->getId(),
                $item->getType(),
                json_encode($item->getMetadata()),
                json_encode($item->getIndexedMetadata()),
                json_encode($item->getSearchableMetadata()),
                json_encode($item->getExactMatchingMetadata()),
                json_encode($item->getSuggest()),
                json_encode(
                    ($item->getCoordinate() instanceof Coordinate)
                        ? $item->getCoordinate()->toArray()
                        : null
                ),
            ]);
        }
    }
757110
protected function getArrayableItems($items)
		{
			if ($items instanceof self) {
				$items = $items->all();
			} elseif ($items instanceof Arrayable) {
				$items = $items->toArray();
			}

			return $items;
		}
949270
public static function fromArray(array $items) : Interoperable
	{
		$obj = new static($items);
		foreach ($items as $key => $item) {
			$obj->__set($key, $item);
		}
		if (! empty($items['id'])) {
			$obj->setId($items[ 'id' ]);
		}
		return $obj;
	}
441737
public function process(array $items)
    {
        foreach ($items as $key => $item) {
            $items[$key] = $this->removeStyle($item);
        }

        return $items;
    }
440475
public static function menuToRules($items)
    {
        $rules = [];
        foreach ($items as $item) {
            $url = ArrayHelper::getValue($item, 'url');
            $urlRule = ArrayHelper::getValue($item, 'urlRule');

            if ($url && $urlRule && is_array($url)) {
                $defaults = $url;
                $route = array_shift($defaults);

                if (is_string($urlRule)) {
                    $rules[] = [
                        'pattern' => Yii::getAlias($urlRule),
                        'route' => $route,
                    ];
                } elseif (is_array($urlRule)) {
                    if (!isset($urlRule['route'])) {
                        $urlRule['route'] = $route;
                    }
                    $rules[] = $urlRule;
                }
            }

            $subItems = ArrayHelper::getValue($item, 'items');
            if (is_array($subItems)) {
                $rules = array_merge(static::menuToRules($subItems), $rules);
            }
        }
        return $rules;
    }
9354
public static function select( $items, $options = [] ) {
		$options['tag'] = 'select';
		$options['item'] = function ( $item, $index ) {
			$itemOptions = [];
			if ( is_array( $item ) ) {
				$label = $item['label'];
                $itemOptions['value'] = $item['value'];
				if ( ! empty( $item['options'] ) && ArrayHelper::isAssociative( $item['options'] ) ) {
                    $itemOptions = array_merge( $itemOptions, $item['options'] );
                }
			} else {
				$label = $item;
				$itemOptions['value'] = $item;
			}

			return static::tag('option', $label, $itemOptions );
		};

		return static::ul( $items, $options );
	}
1173350
public static function make($items)
    {
        if (is_null($items)) {
            return new static;
        }

        if ($items instanceof Collection) {
            return $items;
        }

        return new static(is_array($items) ? $items : [$items]);
    }
87956
protected function processItems(array $items)
    {
        $processedItems = [];

        foreach ($items as $entry) {
            $processedItems[] = ModelFactory::make($entry);
        }

        $this->items = new ModelCollection($processedItems);
    }
363783
protected function getLabelsFromArray(array $items)
    {
        $labels = [];

        foreach ($items as $key => $label) {
            $lang = empty($key) || is_numeric($key) ? $this->defaultLang : $key;
            $labels[] = new Label($label, $this->localeGroup, false, $lang);
        }

        return $labels;
    }
136069
public function getOrderedArray($items = [])
    {
        $ordered = [];
        if (empty($items)) {
            $items = $this->_menuItems;
        }

        foreach ($items as $item) {
            $ordered[] = $item;
        }

        $ordered = Hash::sort($ordered, '{n}.priority', 'ASC');

        foreach ($ordered as &$item) {
            if (isset($item['children']) && !empty($item['children'])) {
                $item['children'] = $this->getOrderedArray($item['children']);
            }
        }

        return $ordered;
    }
468839
public function prepare($items = null)
    {
        $items->each(function ($item) {
            $item->items = collect();
            if ($item->has_categories) {
                $item->items = $this->prepare(ProjectCategories::allForMenu($item->page->uri()));
            }
            $item->href = $this->setHref($item);
            $item->class = $this->setClass($item);
        });

        return $items;
    }
24702
public function process(array $items)
    {
        if (!$this->limit) {
            return $items;
        }
        $total = count($items);
        if ($this->limit > $total) {
            return $items;
        }
        for ($i = $this->limit; $i < $total; $i++) {
            if (isset($items[$i])) {
                unset($items[$i]);
            }
        }

        return $items;
    }
865453
protected function getArrayableItems($items)
    {
        if (is_array($items)) {
            return $items;
        }

        if ($items instanceof Traversable) {
            return iterator_to_array($items);
        }

        return (array) $items;
    }
1016770
public function fromItems(array $items): array
    {
        $objects = [];
        foreach ($items as $item) {
            $objects[] = $this->fromItem($item);
        }

        return $objects;
    }
721318
protected function renderItems($items)
	{
		$script = '';
		foreach ($items as $key => $item)
		{
			if(is_array($item))
			{
				$script = $script."'$key':[";
				foreach ($item as $value)
					$script = $script."'$value',";
				$script = $script."],";
			} else
				$script = $script."'$key':'$item',";
		}
		return $script;
	}