コード例 #1
0
 /**
  * @covers TechG\TechGPU\OOP\Base\BaseObject::getObjParams
  */
 public function testGetObjParams()
 {
     $defaultParameters = $this->getDefArrayParams();
     $baseObj = new BaseObject();
     // Check that return default parameter if not modify on constructor
     $this->assertEquals($defaultParameters, $baseObj->getObjParams());
     $defWithPersParams = $baseObj->getObjParams($this->getPersonalizedArrayParams());
     $this->assertNotEquals($defaultParameters, $defWithPersParams);
     $this->assertEquals(array_replace_recursive($defaultParameters, $this->getPersonalizedArrayParams()), $defWithPersParams);
 }
コード例 #2
0
ファイル: DbgQuery.php プロジェクト: techgardeners/techgpu
 public function __construct($sql = null, StopwatchEvent $timeEvent = null, $conn = null, $res = null)
 {
     parent::__construct();
     $this->name = "QueryInfo_" . uniqid();
     // Contiene la stringa Sql utilizzata per la query
     $this->value->add('sql', new DbgInfoSqlItem('Executed Query', $sql));
     // Contiene i dati dei risultati (num risultati, paginazione, etc..)
     $resultInfoArray = array('affected_rows' => new DbgInfoItem('affected_rows', 0, DbgInfoItem::TYPE_NUMERIC));
     $this->value->add('exec_info', new DbgInfoArrayItem('Execution result info', $resultInfoArray, array('render_type' => 'list')));
     $this->addTimeEventInfo($timeEvent);
     $this->addErrorInfo($conn);
     $this->addExtendedInfo($conn);
     $this->addFieldsInfo($res);
 }
コード例 #3
0
 protected function init()
 {
     parent::init();
     $this->_initRequest();
     $this->_initConnection();
 }