public function all(array $collections = [], $groupByCollection = false)
    {
        if (count($collections) === 0) {
            if ($groupByCollection === false) {
                return $this->items;
            }

            return $this->itemCollections;
        }

        $result = [];

        foreach ($collections as $collection) {
            if (isset($this->itemCollections[$collection]) === false) {
                continue;
            }

            if ($groupByCollection === false) {
                $result = array_merge($result, $this->itemCollections[$collection]);

                continue;
            }

            $result[$collection] = $this->itemCollections[$collection];
        }

        return $result;
    }