| 1 | <?php |
||
| 15 | class SettingsHelper |
||
| 16 | { |
||
| 17 | const SETTINGS_XML_FILE_PATH = 'settings.xml'; |
||
| 18 | |||
| 19 | /** Definition of XML nodes name and attribute used to parse settings data */ |
||
| 20 | const XML_NODE_CONFIG_ITEM = 'config:config-item'; |
||
| 21 | const XML_ATTRIBUTE_CONFIG_NAME = 'config:name'; |
||
| 22 | const XML_ATTRIBUTE_VALUE_ACTIVE_TABLE = 'ActiveTable'; |
||
| 23 | |||
| 24 | /** @var EntityFactory Factory to create entities */ |
||
| 25 | private $entityFactory; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param EntityFactory $entityFactory Factory to create entities |
||
| 29 | */ |
||
| 30 | 30 | public function __construct($entityFactory) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @param string $filePath Path of the file to be read |
||
| 37 | * @return string|null Name of the sheet that was defined as active or NULL if none found |
||
| 38 | */ |
||
| 39 | 30 | public function getActiveSheetName($filePath) |
|
| 63 | } |
||
| 64 |