Файл: concrete5.7.5.6/concrete/src/Backup/ContentImporter/ValueInspector/ValueInspector.php
Строк: 83
<?php
namespace ConcreteCoreBackupContentImporterValueInspector;
use ConcreteCoreBackupContentImporterValueInspectorInspectionRoutineRoutineInterface;
use ConcreteCoreBackupContentImporterValueInspectorItemFileItem;
use ConcreteCoreBackupContentImporterValueInspectorItemPageFeedItem;
use ConcreteCoreBackupContentImporterValueInspectorItemPageItem;
use ConcreteCoreBackupContentImporterValueInspectorItemPageTypeItem;
use ConcreteCoreBackupContentImporterValueInspectorItemPictureItem;
use ConcreteCoreBackupContentImporterValueInspectorItemImageItem;
class ValueInspector implements ValueInspectorInterface
{
protected $routines = array();
public function registerInspectionRoutine(RoutineInterface $routine)
{
$this->routines[$routine->getHandle()] = $routine;
}
public function getInspectionRoutines()
{
return $this->routines;
}
public function inspect($content)
{
$result = new Result($content);
foreach($this->getInspectionRoutines() as $routine) {
$result->addInspectionRoutine($routine);
$items = $routine->match($content);
foreach($items as $item) {
$result->addMatchedItem($item);
}
}
return $result;
}
}