public static function getConfig() { if (self::$config === null) { $file = wa()->getConfig()->getConfigPath('workflow.php', true, 'shop'); if (!file_exists($file)) { $file = wa()->getConfig()->getAppsPath('shop', 'lib/config/data/workflow.php'); } if (file_exists($file)) { self::$config = (include $file); foreach (self::$config['states'] as &$data) { if (!isset($data['classname'])) { $data['classname'] = 'shopWorkflowState'; } } unset($data); } else { self::$config = array(); } } return self::$config; }