PHRAS-1375 config xsendfile ne fonctionne plus

This commit is contained in:
sandeep
2018-03-22 17:09:33 +04:00
parent f729ec6c5f
commit 913a4035d8
2 changed files with 10 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ class XSendFileMappingGenerator extends Command
protected function doExecute(InputInterface $input, OutputInterface $output) protected function doExecute(InputInterface $input, OutputInterface $output)
{ {
$extractor = new DataboxPathExtractor($this->container->getApplicationBox()); $extractor = new DataboxPathExtractor($this->container->getApplicationBox());
$paths = $extractor->extractPaths(); $paths = $extractor->extractPaths('xsendfile');
foreach ($paths as $path) { foreach ($paths as $path) {
$this->container['filesystem']->mkdir($path); $this->container['filesystem']->mkdir($path);
} }

View File

@@ -22,11 +22,19 @@ class DataboxPathExtractor
$this->appbox = $appbox; $this->appbox = $appbox;
} }
public function extractPaths() /**
* @param string $type
* @return array
*/
public function extractPaths($type = null)
{ {
$paths = []; $paths = [];
foreach ($this->appbox->get_databoxes() as $databox) { foreach ($this->appbox->get_databoxes() as $databox) {
if ($type === 'xsendfile') {
$paths[] = (string) $databox->get_sxml_structure()->path;
}
foreach ($databox->get_subdef_structure()->getSubdefGroup('video') as $subdef) { foreach ($databox->get_subdef_structure()->getSubdefGroup('video') as $subdef) {
$paths[] = $subdef->get_path(); $paths[] = $subdef->get_path();
} }