Пример #1
0
 /**
  * Tests Umc->setDataByPath()
  */
 public function testSetDataByPath()
 {
     $data = ['key1' => ['key2' => ['value' => 'val']]];
     $this->umc->setDataByPath('key1/key2/value', "val");
     $this->assertEquals($data, $this->umc->getData());
     $data = $data = ['key1' => ['key2' => 5]];
     $this->umc->setDataByPath('key1', ['key2' => 5]);
     $this->assertEquals($data, $this->umc->getData());
     $data = $data = ['key1' => ['key2' => 5, 'key3' => 'three']];
     $this->umc->setDataByPath('key1/key3', 'three');
     $this->assertEquals($data, $this->umc->getData());
 }
Пример #2
0
 /**
  * constructor
  *
  * @param ObjectManagerInterface $objectManager
  * @param SourceConfig $sourceConfig
  * @param WriterInterface $writer
  * @param Tar $archive
  * @param IoFile $io
  * @param array $generatorMap
  * @param array $data
  */
 public function __construct(ObjectManagerInterface $objectManager, SourceConfig $sourceConfig, WriterInterface $writer, Tar $archive, IoFile $io, array $generatorMap = [], array $data = [])
 {
     $this->objectManager = $objectManager;
     $this->sourceConfig = $sourceConfig;
     $this->writer = $writer;
     $this->archive = $archive;
     $this->io = $io;
     $this->generatorMap = $generatorMap;
     parent::__construct($data);
 }
Пример #3
0
 /**
  * constructor
  *
  * @param IoFile $io
  * @param array $data
  */
 public function __construct(IoFile $io, array $data = [])
 {
     $this->io = $io;
     parent::__construct($data);
 }
Пример #4
0
 /**
  * cosntructor
  *
  * @param ObjectManagerInterface $objectManager
  * @param ModuleReader $moduleReader
  * @param IoFile $io
  * @param ProviderInterface $modelProvider,
  * @param string $defaultScope
  * @param array $processors
  * @param array $data
  */
 public function __construct(ObjectManagerInterface $objectManager, ModuleReader $moduleReader, IoFile $io, ProviderInterface $modelProvider, $defaultScope = 'global', array $processors = [], array $data = [])
 {
     $this->objectManager = $objectManager;
     $this->moduleReader = $moduleReader;
     $this->io = $io;
     $this->processors = $processors;
     $this->defaultScope = $defaultScope;
     $this->modelProvider = $modelProvider;
     parent::__construct($data);
 }
Пример #5
0
 /**
  * @param Escaper $escaper
  * @param array $data
  */
 public function __construct(Escaper $escaper, array $data = [])
 {
     $this->escaper = $escaper;
     parent::__construct($data);
 }
Пример #6
0
 /**
  * constructor
  *
  * @param Filesystem $reader
  * @param array $data
  */
 public function __construct(Filesystem $reader, array $data = [])
 {
     $this->reader = $reader;
     parent::__construct($data);
 }
Пример #7
0
 /**
  * save as XML
  *
  * @param array $keys
  * @param null $rootName
  * @param bool $addOpenTag
  * @param bool $addCdata
  * @return string
  */
 public function toXml(array $keys = [], $rootName = null, $addOpenTag = false, $addCdata = true)
 {
     if (is_null($rootName)) {
         $rootName = $this->getEntityCode();
     }
     if (empty($keys)) {
         $keys = $this->getXmlAttributes();
     }
     return parent::toXml($keys, $rootName, $addOpenTag, $addCdata);
 }