/** * @todo Read one time and store in as private variable to prevent so many read times * @staticvar type $list * @return type */ public function getHash() { static $list; if (!isset($list)) { $content = JFIle::read(JPATH_COMPONENT_ADMINISTRATOR . '/hash.ini'); $array = explode("\n", $content); foreach ($array as $el) { $parts = explode('=', $el); if (count($parts) == 2) { $list[trim($parts[0])] = $parts[1]; } } } return $list; }