public function getContents($type, $index = null, $order = true)
    {
        $contents = [];
        $files    = $this->listFiles($type);

        foreach ($files as $file) {
            $content = $this->load($file);
            $contents[$this->getIndex($file, $content, $index)] = $content;
        }

        if ($order !== null) {
            $order ? ksort($contents) : krsort($contents);
        }

        return $contents;
    }