本文整理汇总了PHP中DataManager::process方法的典型用法代码示例。如果您正苦于以下问题:PHP DataManager::process方法的具体用法?PHP DataManager::process怎么用?PHP DataManager::process使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataManager
的用法示例。
在下文中一共展示了DataManager::process方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DOMDocument
$xmlDoc = new DOMDocument();
$xmlDoc->loadXML($configXML);
$dataManager = new DataManager();
#################################### set input
foreach (array('ReadSVN', 'ReadGitHub', 'ReadGit') as $mod) {
$configList = $xmlDoc->getElementsByTagName($mod);
$configListLength = $configList->length;
if ($configListLength > 0) {
require dirname(__FILE__) . DIRECTORY_SEPARATOR . $mod . '.php';
for ($pos = 0; $pos < $configListLength; $pos++) {
$dataManager->addReader(new $mod($configList->item($pos)));
}
}
}
#################################### process input
$dataManager->process();
#print_r($dataManager->getData());
#print(count($dataManager->getData()));
if (!$dataManager->hasData()) {
die("No data found!\n");
}
#################################### output
foreach (array('WriteHourOfDayData', 'WriteDayOfWeekData', 'WriteICalData', 'WriteDayOfWeekAndHourOfDayData', 'WriteDB', 'WriteRangeByMonth') as $mod) {
$configList = $xmlDoc->getElementsByTagName($mod);
$configListLength = $configList->length;
if ($configListLength > 0) {
require dirname(__FILE__) . DIRECTORY_SEPARATOR . $mod . '.php';
for ($pos = 0; $pos < $configListLength; $pos++) {
$dataManager->writeData(new $mod($configList->item($pos)));
}
}