コード例 #1
0
ファイル: Sim.php プロジェクト: patrickpreuss/Braintacle
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->_hydrator = new \Zend\Stdlib\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('operator' => 'OperatorCode', 'opname' => 'OperatorName', 'country' => 'CountryCode', 'serialnumber' => 'SimSerial', 'deviceid' => 'DeviceId')));
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Client\\Item\\Sim'));
     parent::__construct($serviceLocator);
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->_hydrator = new \Zend\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('workgroup' => 'Workgroup', 'user_domain' => 'UserDomain', 'company' => 'Company', 'owner' => 'Owner', 'product_key' => 'ProductKey', 'product_id' => 'ProductId', 'manual_product_key' => 'ManualProductKey', 'cpu_architecture' => 'CpuArchitecture')));
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Client\\WindowsInstallation'));
     parent::__construct($serviceLocator);
 }
コード例 #3
0
ファイル: Modems.php プロジェクト: hschletz/braintacle
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->_hydrator = new \Zend\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('name' => 'Name', 'type' => 'Type')));
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Client\\Item\\Modem'));
     parent::__construct($serviceLocator);
 }
コード例 #4
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'drives';
     $this->_hydrator = new \Database\Hydrator\Filesystems();
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Client\\Item\\Filesystem'));
     parent::__construct($serviceLocator);
 }
コード例 #5
0
ファイル: Cpu.php プロジェクト: patrickpreuss/Braintacle
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'cpus';
     $this->_hydrator = new \Zend\Stdlib\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('manufacturer' => 'Manufacturer', 'type' => 'Type', 'cores' => 'NumCores', 'cpuarch' => 'Architecture', 'data_width' => 'DataWidth', 'l2cachesize' => 'L2CacheSize', 'socket' => 'SocketType', 'speed' => 'NominalClock', 'current_speed' => 'CurrentClock', 'voltage' => 'Voltage', 'serialnumber' => 'Serial')));
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Client\\Item\\Cpu'));
     parent::__construct($serviceLocator);
 }
コード例 #6
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'officepack';
     $this->_hydrator = new \Zend\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('product' => 'Name', 'officeversion' => 'Version', 'note' => 'ExtraDescription', 'type' => 'Architecture', 'productid' => 'ProductId', 'officekey' => 'ProductKey', 'guid' => 'Guid', 'install' => 'Type')));
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Client\\Item\\MsOfficeProduct'));
     parent::__construct($serviceLocator);
 }
コード例 #7
0
ファイル: Displays.php プロジェクト: patrickpreuss/Braintacle
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'monitors';
     $this->_hydrator = new \Zend\Stdlib\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('manufacturer' => 'Manufacturer', 'caption' => 'Description', 'serial' => 'Serial', 'description' => 'ProductionDate', 'type' => 'Type')));
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Client\\Item\\Display'));
     parent::__construct($serviceLocator);
 }
コード例 #8
0
ファイル: AudioDevices.php プロジェクト: hschletz/braintacle
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'sounds';
     $this->_hydrator = new \Zend\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('manufacturer' => 'Manufacturer', 'name' => 'Name', 'description' => 'Description')));
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Client\\Item\\AudioDevice'));
     parent::__construct($serviceLocator);
 }
コード例 #9
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'virtualmachines';
     $this->_hydrator = new \Zend\Stdlib\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('name' => 'Name', 'status' => 'Status', 'subsystem' => 'Product', 'vmtype' => 'Type', 'uuid' => 'Uuid', 'vcpu' => 'NumCpus', 'memory' => 'GuestMemory')));
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Client\\Item\\VirtualMachine'));
     parent::__construct($serviceLocator);
 }
コード例 #10
0
ファイル: Subnets.php プロジェクト: patrickpreuss/Braintacle
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'subnet';
     $this->_hydrator = new \Zend\Stdlib\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('netid' => 'Address', 'mask' => 'Mask', 'name' => 'Name', 'num_inventoried' => 'NumInventoried', 'num_identified' => 'NumIdentified', 'num_unknown' => 'NumUnknown')));
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Network\\Subnet'));
     parent::__construct($serviceLocator);
 }
コード例 #11
0
ファイル: Operators.php プロジェクト: hschletz/braintacle
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $map = array('id' => 'Id', 'firstname' => 'FirstName', 'lastname' => 'LastName', 'email' => 'MailAddress', 'comments' => 'Comment');
     $this->_hydrator = new \Zend\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy($map));
     $this->_hydrator->addFilter('whitelist', new \Library\Hydrator\Filter\Whitelist($map));
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Operator\\Operator'));
     parent::__construct($serviceLocator);
 }
コード例 #12
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'memories';
     $this->_hydrator = new \Zend\Stdlib\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('numslots' => 'SlotNumber', 'type' => 'Type', 'capacity' => 'Size', 'speed' => 'Clock', 'caption' => 'Caption', 'description' => 'Description', 'serialnumber' => 'Serial')));
     $this->_hydrator->addStrategy('Size', new \Database\Hydrator\Strategy\MemorySlots\Size());
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Client\\Item\\MemorySlot'));
     parent::__construct($serviceLocator);
 }
コード例 #13
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'groups';
     // Hydrator and ResultSet initialization is postponed to initialize()
     // because they depend on reading from Model\Config which is
     // inappropriate in a constructor and may not be functional under
     // certain circumstances (database initialization)
     parent::__construct($serviceLocator);
 }
コード例 #14
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'regconfig';
     $this->_hydrator = new \Zend\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('id' => 'Id', 'name' => 'Name', 'regtree' => 'RootKey', 'regkey' => 'SubKeys', 'regvalue' => 'Value')));
     $value = new \Database\Hydrator\Strategy\RegistryValueDefinitions\Value();
     $this->_hydrator->addStrategy('Value', $value);
     $this->_hydrator->addStrategy('regvalue', $value);
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Registry\\Value'));
     parent::__construct($serviceLocator);
 }
コード例 #15
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'videos';
     $this->_hydrator = new \Zend\Stdlib\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('name' => 'Name', 'chipset' => 'Chipset', 'memory' => 'Memory', 'resolution' => 'CurrentResolution')));
     // Strategies are only required on hydration. Once sanitized, the
     // original values can be discarded.
     $this->_hydrator->addStrategy('Memory', new \Database\Hydrator\Strategy\DisplayControllers\Memory());
     $this->_hydrator->addStrategy('CurrentResolution', new \Database\Hydrator\Strategy\DisplayControllers\CurrentResolution());
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Client\\Item\\DisplayController'));
     parent::__construct($serviceLocator);
 }
コード例 #16
0
ファイル: Packages.php プロジェクト: hschletz/braintacle
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'download_available';
     $map = array('name' => 'Name', 'fileid' => 'Id', 'priority' => 'Priority', 'fragments' => 'NumFragments', 'size' => 'Size', 'osname' => 'Platform', 'comment' => 'Comment', 'num_pending' => 'NumPending', 'num_running' => 'NumRunning', 'num_success' => 'NumSuccess', 'num_error' => 'NumError');
     $this->_hydrator = new \Zend\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy($map));
     $this->_hydrator->addFilter('whitelist', new \Library\Hydrator\Filter\Whitelist($map));
     $platform = new \Database\Hydrator\Strategy\Packages\Platform();
     $this->_hydrator->addStrategy('Platform', $platform);
     $this->_hydrator->addStrategy('osname', $platform);
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Package\\Package'));
     parent::__construct($serviceLocator);
 }
コード例 #17
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'netmap';
     $this->_hydrator = new \Zend\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy(array('ip' => 'IpAddress', 'mac' => 'MacAddress', 'name' => 'Hostname', 'date' => 'DiscoveryDate', 'description' => 'Description', 'type' => 'Type')));
     $dateTimeFormatter = new \Zend\Hydrator\Strategy\DateTimeFormatterStrategy($serviceLocator->get('Database\\Nada')->timestampFormatPhp(), new \DateTimeZone('UTC'));
     $this->_hydrator->addStrategy('DiscoveryDate', $dateTimeFormatter);
     $this->_hydrator->addStrategy('date', $dateTimeFormatter);
     $macAddress = new \Library\Hydrator\Strategy\MacAddress();
     $this->_hydrator->addStrategy('MacAddress', $macAddress);
     $this->_hydrator->addStrategy('mac', $macAddress);
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Network\\Device'));
     parent::__construct($serviceLocator);
 }
コード例 #18
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'networks';
     $hydratorMap = array('description' => 'Description', 'speed' => 'Rate', 'macaddr' => 'MacAddress', 'ipaddress' => 'IpAddress', 'ipmask' => 'Netmask', 'ipgateway' => 'Gateway', 'ipsubnet' => 'Subnet', 'ipdhcp' => 'DhcpServer', 'status' => 'Status', 'type' => 'Type', 'typemib' => 'TypeMib', 'is_blacklisted' => 'IsBlacklisted');
     // Don't extract the virtual IsBlacklisted property
     $extractorMap = array_flip($hydratorMap);
     unset($extractorMap['IsBlacklisted']);
     $this->_hydrator = new \Zend\Stdlib\Hydrator\ArraySerializable();
     $this->_hydrator->setNamingStrategy(new \Database\Hydrator\NamingStrategy\MapNamingStrategy($hydratorMap, $extractorMap));
     $this->_hydrator->addFilter('whitelist', new \Library\Hydrator\Filter\Whitelist(array_keys($extractorMap)));
     $this->_hydrator->addStrategy('MacAddress', new \Library\Hydrator\Strategy\MacAddress());
     $this->_hydrator->addStrategy('macaddr', new \Library\Hydrator\Strategy\MacAddress());
     $this->resultSetPrototype = new \Zend\Db\ResultSet\HydratingResultSet($this->_hydrator, $serviceLocator->get('Model\\Client\\Item\\NetworkInterface'));
     parent::__construct($serviceLocator);
 }
コード例 #19
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'braintacle_blacklist_assettags';
     parent::__construct($serviceLocator);
 }
コード例 #20
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'blacklist_macaddresses';
     parent::__construct($serviceLocator);
 }
コード例 #21
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'accountinfo_config';
     parent::__construct($serviceLocator);
 }
コード例 #22
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'groups_cache';
     parent::__construct($serviceLocator);
 }
コード例 #23
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'javainfos';
     parent::__construct($serviceLocator);
 }
コード例 #24
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'software_definitions';
     parent::__construct($serviceLocator);
 }
コード例 #25
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'braintacle_windows';
     parent::__construct($serviceLocator);
 }
コード例 #26
0
 /**
  * {@inheritdoc}
  * @codeCoverageIgnore
  */
 public function __construct(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
 {
     $this->table = 'download_enable';
     parent::__construct($serviceLocator);
 }