michaelbmuller / 50001-ready-guidance-test
50001 Ready 指引
v0.4.0
2017-10-06 18:45 UTC
Requires
- php: >=5.6
Requires (Dev)
- doctrine/instantiator: 1.0.5
- phpdocumentor/reflection-docblock: 3.0.3
- phpunit/php-token-stream: ~1.4
- phpunit/phpunit: ~5.7
This package is auto-updated.
Last update: 2024-09-29 04:31:22 UTC
README
此支持库包括所有美国能源部 50001 Ready 导航器指南,分为 25 个单独的任务。50001 Ready 导航器为符合 ISO 50001 能源管理体系标准的能源管理系统的实施和维护提供了逐步指导。
安装
使用 Composer
$ composer require michaelbmuller/50001-ready-guidance-test
{ "require": { "michaelbmuller/50001-ready-guidance-test": "dev-master" } }
加载指南
<?php require 'vendor/autoload.php'; use DOE_50001_Ready\Guidance; //Load guidance $guidance = new Guidance(); //Load alternate language (example: español) $guidance = new Guidance('es'); //Set Custom Task Tips $guidance->setCustomTips($customTips); //Section Related Functions $sections = $guidance->getSections(); $sectionName = $guidance->getSectionName($sectionCode); $previousSectionCode = $guidance->previousSection($sectionCode, $dashboardCode = 'dashboard'); $nextSectionCode = $guidance->nextSection($sectionCode, $dashboardCode = 'dashboard'); //Get All Tasks $tasks = $guidance->getTasks(); //Get Section Tasks $tasks = $guidance->getTasks([sectionCode]); //Get Task $task = $guidance->getTask([taskId]); $task = $guidance->getTaskByMenuName($menuName); //Or load Task 1 directly $task = Task::load(1,'en');
访问任务详情
<?php /** @var \DOE_50001_Ready\Task $task */ //Available Task Data $task->id(); $task->getMenuName(); $task->getTitle(); $task->language_requested; $task->language_displayed; /** ONLY AVAILABLE WHEN TASKS LOADED THROUGH GUIDANCE */ $task->sectionCode; $task->section; $task->relatedIsoSections; $task->prerequisites; $task->leadsTo; $task->custom_tips; //customTips Must be externally loaded with $guidance->setCustomTips($customTips); $task->resources; //With Processed Markup Text $task->getGettingItDone(); $task->getTaskOverview(); $task->getFullDescription(); $task->getOtherIsoTips(); $task->getEnergyStarTips(); $task->getCustomTips();
访问资源详情
<?php /** @var \DOE_50001_Ready\Resource $resource */ //Available Task Data $resource->id; $resource->name; $resource->file_type; $resource->short_description; $resource->file_name; $resource->link;
指南标记
默认 MarkupProcessor 通过替换为基本文本来简化任务标记标签。
如何设置新的 Markup Processor
//Create a new Markup Processor that implements the required interface class NewMarkupProcessor implementes MarkupProcessorInterface //Inject the new Markup Processor into the Guidance or Tasks $guidance = new Guidance($language, NewMarkupProcessor::class); $task = new Task::load($task_id, $language, NewMarkupProcessor::class);
标记类型
任务链接
指向其他任务的嵌入式链接
[task](Menu Name)
资源链接
指向资源的嵌入式链接
[resource](Resource_Code_Name)
手风琴
需要打开和关闭标签
允许内容展开和折叠
[Accordion](Title of Accordion Content) **Accordion Content** [Accordion End]
了解更多
需要打开和关闭标签
允许内容展开和折叠
[Learn More](Title of Learn More Content) **Learn More Content** [Learn More End]
重要说明
- 指南的英文版本是默认和主要版本,用作翻译版本的基础。
- 如果请求的语言不可用,则返回英文版本。
- 非英文指南内容文件夹包含用于翻译的英文版本副本,以提供在英文版本更新时需要更新的指导。
贡献者
库开发者:Michael B Muller
50001 Ready 任务指南由以下机构开发
- 美国能源部
- 劳伦斯伯克利国家实验室
- 乔治亚理工学院