public static function mail_template_list() { $path = \ebi\Conf::get(\ebi\Mail::class . '@resource_path', \ebi\Conf::resource_path('mail')); $template_list = []; try { foreach (\ebi\Util::ls($path, true, '/\\.xml$/') as $f) { $info = new \ebi\Dt\DocInfo(); $info->name(str_replace(\ebi\Util::path_slash($path, null, true), '', $f->getPathname())); try { $xml = \ebi\Xml::extract(file_get_contents($f->getPathname()), 'mail'); $info->document($xml->find_get('subject')->value()); $info->set_opt('x_t_code', \ebi\Mail::xtc($info->name())); $template_list[] = $info; } catch (\ebi\exception\NotFoundException $e) { } } } catch (\ebi\exception\InvalidArgumentException $e) { } return $template_list; }