load

@access public
@param  bool $sDebug
@param  string $sOtherPortail change the default portal to create the entity
@return array
500357
public function load($bDebug = false, $sOtherPortail = null)
	{
		$sQuery = $this->_prepare();

		if ($bDebug === true) { echo $sQuery;  }

		$aResults = self::connect()->query($sQuery)->fetchAll(\PDO::FETCH_ASSOC);
		$aReturn = array();
		$i = 0;

		foreach ($aResults as $mKey => $aOneResult) {

			if (isset($aOneResult['.FOUND_ROWS()'])) {

				return $aOneResult['.FOUND_ROWS()'];
			}
			else {

				if ($this->_sFromAs) { $sPrefix = $this->_sFromAs.'.'; }
				else { $sPrefix = ''; }

				$aReturn[$i] = Entity::autoLoadEntity($this->_sFrom, $aOneResult, $sPrefix, true, $sOtherPortail);

				foreach ($this->_aJoin as $aJoin) {

					if (count($aJoin) > 0) {

						if ($aJoin['as']) { $sPrefixJoin = $aJoin['as'].'.'; }
						else { $sPrefixJoin = ''; }
 
						$sPropertieName = 'get_'.$aJoin['table'];

						if (method_exists($aReturn[$i], $sPropertieName)) {
						    
						    $sPropertieName = $aJoin['table'].'2';
						    $aReturn[$i]->$sPropertieName = Entity::autoLoadEntity($aJoin['table'], $aOneResult, $sPrefixJoin, true, $sOtherPortail);
						}
						else {
						
						    $aReturn[$i]->$aJoin['table'] = Entity::autoLoadEntity($aJoin['table'], $aOneResult, $sPrefixJoin, true, $sOtherPortail);
						}
					}
				} 

				$i++;
			}
		}

		$this->flush();

		if ($this->_mWhere instanceof Where) { $this->_mWhere->flush(); }

		/**
		 * Trigger on a model to initialize it every time you load each entity
		 */
		if (isset($aReturn[0]) && method_exists($aReturn[0], 'afterFetch')) {
		    
		    foreach ($aReturn as $iKey => $oOne) {
		    
		        $aReturn[$iKey]::afterFetch();
		    }
		}
		
		return $aReturn;
	}
1100114
public function loadObject($params=array()) {

		$this->openConnection();
		
		$obj = NULL;
		
		try {
			
			$stat = $this->handler->prepare($this->query);
			$stat->execute((array)$params);
			$obj = $stat->fetch(\PDO::FETCH_OBJ);
			
			// logger
			$this->logParamQuery($this->query, (bool)$obj, $params);

		} catch (\PDOException $e) {

			$this->handleException($e, $params);
		
		}
		
		$stat->closeCursor();

		return $obj;
		
	}
116254
private function fetchCustomEntities(array $queriesMap, callable $queryBuilderCallback = null)
    {
        foreach ($queriesMap as $customEntityClass => &$initProperties) {
            $customEntityDoctrineMeta = $this->extendedMetadataFactory->getDoctrineMetadata($customEntityClass);

            foreach ($initProperties as $initProperty => &$initPropertyValues) {
                if (!$customEntityDoctrineMeta->hasField($initProperty)
                    && !$customEntityDoctrineMeta->hasAssociation($initProperty)
                ) {
                    throw new CustomObjectException(
                        sprintf('Property "%s::$%s" is not mapped field or association.', $customEntityClass, $initProperty)
                    );
                }

                $customEntityRepository = $this->em->getRepository($customEntityClass);

                if (1 === count($initPropertyValues)) {
                    $initPropertyValue = reset($initPropertyValues);
                    $qb = $customEntityRepository->createQueryBuilder('o')
                        ->andWhere(sprintf('o.%s = :%1$s', $initProperty))
                        ->setParameter($initProperty, $initPropertyValue);

                    if (!empty($queryBuilderCallback)) {
                        $queryBuilderCallback($qb);
                    }
                    try {
                        $customEntity = $qb->getQuery()->getOneOrNullResult();
                    } catch (NonUniqueResultException $ex) {
                        throw new CustomObjectException(
                            sprintf(
                                'Unable to fetch custom entity "%s" by %s "%s": entity is not unique.',
                                $customEntityRepository->getClassName(),
                                $initProperty,
                                $initPropertyValue
                            )
                        );
                    }
                    if (!empty($customEntity)) {
                        $initPropertyValues[$initPropertyValue] = $customEntity;

                        continue;
                    }

                    unset($initPropertyValues[$initPropertyValue]);

                    continue;
                }

                $qb = $customEntityRepository->createQueryBuilder('o');
                $qb->where($qb->expr()->in('o.'.$initProperty, $initPropertyValues));

                if (!empty($queryBuilderCallback)) {
                    $queryBuilderCallback($qb);
                }

                $customEntities = $qb->getQuery()->getResult();

                /** @var callable $getPropertyValueCallback */
                $getPropertyValueCallback = [$this, 'getPropertyValue'];

                $customEntities = array_combine(array_map(function ($customEntity) use ($getPropertyValueCallback, $initProperty) {
                    return $getPropertyValueCallback($customEntity, $initProperty);
                }, $customEntities), $customEntities);

                foreach ($initPropertyValues as &$initPropertyValue) {
                    if (isset($customEntities[$initPropertyValue])) {
                        $initPropertyValue = $customEntities[$initPropertyValue];

                        continue;
                    }

                    unset($initPropertyValues[$initPropertyValue]);
                }

                unset($initPropertyValue);
            }

            unset($initPropertyValues);
        }

        unset($initProperties);

        return $queriesMap;
    }
250499
public function loadJSONObject($jsonObject)
    {
        if (isset($jsonObject->email)) {
            $this->setEmail($jsonObject->email);
        }
        if (isset($jsonObject->issues)) {
            $this->setIssues($jsonObject->issues);
        }
        if (isset($jsonObject->forum)) {
            $this->setForum($jsonObject->forum);
        }
        if (isset($jsonObject->wiki)) {
            $this->setWiki($jsonObject->wiki);
        }
        if (isset($jsonObject->irc)) {
            $this->setIrc($jsonObject->irc);
        }
        if (isset($jsonObject->source)) {
            $this->setSource($jsonObject->source);
        }
        if (isset($jsonObject->docs)) {
            $this->setDocs($jsonObject->docs);
        }
        if (isset($jsonObject->rss)) {
            $this->setRss($jsonObject->rss);
        }
        if (isset($jsonObject->chat)) {
            $this->setChat($jsonObject->chat);
        }

        return $this;
    }
374978
public static function load()
    {
        if (!extension_loaded('opencensus')) {
            trigger_error('opencensus extension required to load Eloquent integrations.', E_USER_WARNING);
            return;
        }

        // public function getModels($columns = ['*'])
        opencensus_trace_method(Builder::class, 'getModels', function ($builder) {
            return [
                'name' => 'eloquent/get',
                'attributes' => [
                    'query' => $builder->toBase()->toSql()
                ],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // protected function performInsert(Builder $query)
        opencensus_trace_method(Model::class, 'performInsert', function ($model, $query) {
            return [
                'name' => 'eloquent/insert',
                'attributes' => [
                    'query' => $query->toBase()->toSql()
                ],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // protected function performUpdate(Builder $query)
        opencensus_trace_method(Model::class, 'performUpdate', function ($model, $query) {
            return [
                'name' => 'eloquent/update',
                'attributes' => [
                    'query' => $query->toBase()->toSql()
                ],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // public function delete()
        opencensus_trace_method(Model::class, 'delete', function ($model) {
            return [
                'name' => 'eloquent/delete',
                'kind' => Span::KIND_CLIENT
            ];
        });
    }
374915
public function getStateOnDate($datestamp, $addCountryCode = false)
    {
        $result = [];
        $bind = [];
        $bind[QBldMax::BND_ON_DATE] = $datestamp;
        $query = $this->qbuildSnapOnDate->build();
        if ($addCountryCode) {
            /* define tables aliases */
            $as = self::AS_TBL_DWNL;
            $tbl = $this->resource->getTableName(ECustomer::ENTITY_NAME);
            $on = $as . '.' . ECustomer::A_CUSTOMER_REF . '='
                . QBldSnap::AS_DWNL_SNAP . '.' . Entity::A_CUSTOMER_REF;
            $cols = [
                self::A_COUNTRY => ECustomer::A_COUNTRY_CODE,
                self::A_MLM_ID => ECustomer::A_MLM_ID
            ];
            $query->joinLeft([$as => $tbl], $on, $cols);
        }
        $query->order(
            QBldSnap::AS_DWNL_SNAP . '.'
            . \Praxigento\Downline\Repo\Data\Snap::A_DEPTH
        );
        $rows = $this->conn->fetchAll($query, $bind);
        if (count($rows)) {
            foreach ($rows as $one) {
                $result[$one[\Praxigento\Downline\Repo\Query\Snap\OnDate\Builder::A_CUST_ID]] = $one;
            }
        }
        return $result;
    }
57938
public function loadData($printQuery = false, $logQuery = false)
    {
        if ($this->isLoaded()) {
            return $this;
        }

        $this->clear();

        foreach ($this->getResource()->getJobCodes() as $jobCode) {
            if (!empty($this->whiteList) && !in_array($jobCode, $this->whiteList)) {
                continue;
            }
            if (!empty($this->blackList) && in_array($jobCode, $this->blackList)) {
                continue;
            }

            $job = $this->getNewEmptyItem()->load($jobCode);
            if ($this->activeOnly && !$job->getIsActive()) {
                continue;
            }
            if ($this->dbOnly && !$job->isDbOnly()) {
                continue;
            }

            $this->addItem($job);
        }

        ksort($this->_items);

        $this->_setIsLoaded(true);

        return $this;
    }
991265
public function loadRDFaDeliverySetList($sDelId = null)
    {
        $sTable = getViewName('oxdeliveryset');
        if ($sDelId) {
            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
            $sSubSql = "( select $sTable.* from $sTable left join oxdel2delset on oxdel2delset.oxdelsetid=$sTable.oxid where " . $this->getBaseObject()->getSqlActiveSnippet() . " and oxdel2delset.oxdelid = " . $oDb->quote($sDelId) . " ) as $sTable";
        } else {
            $sSubSql = $sTable;
        }
        $sQ = "select $sTable.*, oxobject2delivery.oxobjectid from $sSubSql left join (select oxobject2delivery.* from oxobject2delivery where oxobject2delivery.oxtype = 'rdfadeliveryset' ) as oxobject2delivery on oxobject2delivery.oxdeliveryid=$sTable.oxid where " . $this->getBaseObject()->getSqlActiveSnippet() . " ";
        $this->selectString($sQ);
    }
954519
public function loadAutogeneratedEntries($parentId, $includeHistory = false)
    {
        /** @var $query \eZ\Publish\Core\Persistence\Database\SelectQuery */
        $query = $this->dbHandler->createSelectQuery();
        $query->select(
            '*'
        )->from(
            $this->dbHandler->quoteTable($this->table)
        )->where(
            $query->expr->lAnd(
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('parent'),
                    $query->bindValue($parentId, null, \PDO::PARAM_INT)
                ),
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('action_type'),
                    $query->bindValue('eznode', null, \PDO::PARAM_STR)
                ),
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('is_alias'),
                    $query->bindValue(0, null, \PDO::PARAM_INT)
                )
            )
        );

        if (!$includeHistory) {
            $query->where(
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('is_original'),
                    $query->bindValue(1, null, \PDO::PARAM_INT)
                )
            );
        }

        $statement = $query->prepare();
        $statement->execute();

        return $statement->fetchAll(\PDO::FETCH_ASSOC);
    }
1317821
protected function load()
    {
        if ($this->loaded)
        {
            return;
        }

        $table = ORM::getTable(Eresus_Plugin_Registry::getInstance()->load('gallery'), 'Image');
        $q = $table->createSelectQuery();
        $e = $q->expr;

        $q->where(
            $e->lAnd(
                $e->eq('section', $q->bindValue($this->sectionId, null, PDO::PARAM_INT)),
                $e->eq('active', $q->bindValue(true, null, PDO::PARAM_BOOL)),
                $e->neq('groupId', 0)
            ))->
            orderBy('groupId');

        $this->items = $table->loadFromQuery($q);

        $this->loaded = true;
    }
14097
public static function getInstance($sName, $bReset = FALSE) {

		if ($bReset) {
			static::$_lInstance[$sName] = NULL;
		}

		if (!$oDB =& static::$_lInstance[$sName]) {

			$aConfig = Config::get('db');
			$aServer =& $aConfig['server'][$sName];
			if (!is_array($aServer)) {
				throw new TangoException('unknown server "' . $sName . '"');
			}

			$aServer += $aConfig['default'];
			$aServer += [
				'dbname' => $sName, // if dbname is empty, set as name
				'debug' => FALSE,
			];

			$oDB = new self($aServer, $sName);
		}
		return $oDB;
	}
281365
public function load($properties = array())
    {
        $keys = $this->getIdentifyingData();

        if (empty($keys)) {
            throw new AnDomainEntityException('Trying to load an entity without any identifying data');
        }

        //prevent from creating two differne entities
        if (!$this->_persisted) {
            //if found another entity
            $entity = $this->getRepository()->find($keys, false);

            if ($entity && $entity !== $this) {
                $this->reset();

                return $entity->load($properties);
            }
        }

        settype($properties, 'array');

        if (empty($properties)) {
            //only load serializbale properties (i.e. attributes, many to one relationships)
            $properties = array();

            foreach ($this->getEntityDescription()->getProperty() as $property) {
                if ($property->isSerializable()) {
                    $properties[] = $property->getName();
                }
            }

            $keys = array_keys($this->getEntityDescription()->getIdentifyingProperties());
            $properties = array_diff($properties, $keys);
        }

        if ($this->_data->load($properties)) {
            //enttiy has been fetched for the first time
            if (!$this->_persisted) {
                $keys = $this->getIdentifyingData();
                $this->_persisted = true;
                $this->getRepository()->getSpace()->insertEntity($this, $keys);
                $this->reset();
            } else {
                //the loaded properties are no longer modified
                foreach ($properties as $property) {
                    unset($this->_modified[$property]);
                }

                //reset the element if there are no modified
                if (count($this->_modified) === 0) {
                    $this->reset();
                }
            }
        } else {
            //if a persisted entity can not be loaded then
            //it must mean the data doesn't exists in the store
            //can we assume then the data has been somehow deleted ?
            //if that's the case then we need to set the state to destroyed
            if ($this->persisted()) {
                $this->getRepository()->getSpace()->setEntityState($this, AnDomain::STATE_DESTROYED);
            } else {
                $this->reset();
            }
        }

        return $this;
    }
728050
function parent($new = null, $return_entity = false)
    {
        if (isset($new)){
            if ($new instanceof Entity){
                $this->_parent = $new;
                $new = $new->uri();
            }else{
                $this->_parent = null; // for reloading
            }
            if ($new != $this->_attributes['parent']){
                $this->change('parent', $new);
                $this->change('order', Entity::MAX_ORDER);
                $this->change('uri', $new.'/'.$this->_attributes['name']);
            }
        }
        if ($return_entity){
            if (!isset($this->_parent)){
                if (isset($this->_attributes['parent'])){
                    $this->_parent = Data::read($this->_attributes['parent']);
                }else{
                    $this->_parent = false;
                }
            }
            return $this->_parent;
        }
        return $this->_attributes['parent'];
    }
1063839
public function getBatchInsertRequest($insertBindsByKeys)
    {
        $db = $this->_getConnection();
        $table = $this->table;
        $self = $this;
        $primary = $this->_getPrimaryKetArray();

        $request = new StorageDataRequest(
            [$insertBindsByKeys],
            function ($insertBindsByKeys) use ($db, $table, $self, $primary) {
                if (!$db) {
                    $self->logError('Missing connection on getBatchInsertRequest on table: ' . $table);
                    return false;
                }

                $firstElement = \reset($insertBindsByKeys);
                if (!$firstElement) {
                    $self->logError('Empty bind or first element on getBatchInsertRequest on table: ' . $table);
                    return [];
                }

                $keys = array_unique(array_merge($primary, array_keys($firstElement)));

                $primaryHintApplicable = \count($primary) === 1;

                $valuesArray = [];
                foreach ($insertBindsByKeys as $id => $bind) {
                    $values = [];

                    if ($primaryHintApplicable) {
                        $bind = $self->prepareKey($primary, $id) + $bind;
                    }

                    $bind = $self->prepareBind($bind, $db);
                    foreach ($keys as $key) {
                        $values[] = $bind[$key] ?? null;
                    }

                    $valuesArray[] = '(' . implode(',', $values) . ')';
                }

                $query = 'INSERT INTO ' . $table . ' as t '
                    . ' (' . implode(',', $keys) . ') VALUES '
                    . implode(',', $valuesArray)
                    . $self->makeConstraintHintPostfix()
                    . ' RETURNING *';

                $stmnt = $db->query($query);

                if (!$stmnt) {
                    $self->logError('Cannot execute getBatchInsertRequest on table: ' . $table . ':' . implode(',', $db->errorInfo()), [
                        'code' => $db->errorCode(),
                    ]);

                    return false;
                }

                $result = $stmnt->fetchAll(PDO::FETCH_ASSOC);

                if (!$result && (int) $stmnt->errorCode() > 0) {
                    $self->logError('Error on execution on getBatchInsertRequest on table: ' . $table . ':' . implode(',',
                            $stmnt->errorInfo()), [
                        'code' => $stmnt->errorCode(),
                    ]);

                    return false;
                }

                return $result;
            });

        return $request;
    }
117581
public static function load()
    {
        if (!extension_loaded('opencensus')) {
            trigger_error('opencensus extension required to load Memcached integrations.', E_USER_WARNING);
            return;
        }

        // bool Memcached::add ( string $key , mixed $value [, int $expiration ] )
        opencensus_trace_method('Memcached', 'add', [self::class, 'handleAttributes']);

        // bool Memcached::addByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )
        opencensus_trace_method('Memcached', 'addByKey', [self::class, 'handleAttributesByKey']);

        // bool Memcached::append ( string $key , string $value )
        opencensus_trace_method('Memcached', 'append', [self::class, 'handleAttributes']);

        // bool Memcached::appendByKey ( string $server_key , string $key , string $value )
        opencensus_trace_method('Memcached', 'appendByKey', [self::class, 'handleAttributesByKey']);

        // bool Memcached::cas ( float $cas_token , string $key , mixed $value [, int $expiration ] )
        opencensus_trace_method('Memcached', 'cas', [self::class, 'handleCas']);

        // bool Memcached::casByKey ( float $cas_token , string $server_key , string $key , mixed $value
        //                            [, int $expiration ] )
        opencensus_trace_method('Memcached', 'casByKey', [self::class, 'handleCasByKey']);

        // int Memcached::decrement ( string $key [, int $offset = 1 [, int $initial_value = 0 [, int $expiry = 0 ]]] )
        opencensus_trace_method('Memcached', 'decrement', [self::class, 'handleAttributes']);

        // int Memcached::decrementByKey ( string $server_key , string $key [, int $offset = 1 [, int $initial_value = 0
        //                                 [, int $expiry = 0 ]]] )
        opencensus_trace_method('Memcached', 'decrementByKey', [self::class, 'handleAttributesByKey']);

        // bool Memcached::delete ( string $key [, int $time = 0 ] )
        opencensus_trace_method('Memcached', 'delete', [self::class, 'handleAttributes']);

        // bool Memcached::deleteByKey ( string $server_key , string $key [, int $time = 0 ] )
        opencensus_trace_method('Memcached', 'deleteByKey', [self::class, 'handleAttributesByKey']);

        // bool Memcached::flush ([ int $delay = 0 ] )
        opencensus_trace_method('Memcached', 'flush');

        // mixed Memcached::get ( string $key [, callable $cache_cb [, int &$flags ]] )
        opencensus_trace_method('Memcached', 'get', [self::class, 'handleAttributes']);

        // mixed Memcached::getByKey ( string $server_key , string $key [, callable $cache_cb [, int $flags ]] )
        opencensus_trace_method('Memcached', 'getByKey', [self::class, 'handleAttributesByKey']);

        // mixed Memcached::getMulti ( array $keys [, int $flags ] )
        opencensus_trace_method('Memcached', 'getMulti', [self::class, 'handleAttributes']);

        // array Memcached::getMultiByKey ( string $server_key , array $keys [, int $flags ] )
        opencensus_trace_method('Memcached', 'getMultiByKey', [self::class, 'handleAttributesByKey']);

        // int Memcached::increment ( string $key [, int $offset = 1 [, int $initial_value = 0 [, int $expiry = 0 ]]] )
        opencensus_trace_method('Memcached', 'increment', [self::class, 'handleAttributes']);

        // int Memcached::incrementByKey ( string $server_key , string $key [, int $offset = 1 [, int $initial_value = 0
        //                                 [, int $expiry = 0 ]]] )
        opencensus_trace_method('Memcached', 'incrementByKey', [self::class, 'handleAttributesByKey']);

        // bool Memcached::prepend ( string $key , string $value )
        opencensus_trace_method('Memcached', 'prepend', [self::class, 'handleAttributes']);

        // bool Memcached::prependByKey ( string $server_key , string $key , string $value )
        opencensus_trace_method('Memcached', 'prependByKey', [self::class, 'handleAttributesByKey']);

        // bool Memcached::replace ( string $key , mixed $value [, int $expiration ] )
        opencensus_trace_method('Memcached', 'replace', [self::class, 'handleAttributes']);

        // bool Memcached::replaceByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )
        opencensus_trace_method('Memcached', 'replaceByKey', [self::class, 'handleAttributesByKey']);

        // bool Memcached::set ( string $key , mixed $value [, int $expiration ] )
        opencensus_trace_method('Memcached', 'set', [self::class, 'handleAttributes']);

        // bool Memcached::setByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )
        opencensus_trace_method('Memcached', 'setByKey', [self::class, 'handleAttributesByKey']);

        // bool Memcached::setMulti ( array $items [, int $expiration ] )
        opencensus_trace_method('Memcached', 'setMulti', [self::class, 'handleSetMulti']);

        // bool Memcached::setMultiByKey ( string $server_key , array $items [, int $expiration ] )
        opencensus_trace_method('Memcached', 'setMultiByKey', [self::class, 'handleSetMultiByKey']);
    }
1191559
public static function load()
    {
        if (!extension_loaded('opencensus')) {
            trigger_error('opencensus extension required to load mysqli integrations.', E_USER_WARNING);
            return;
        }

        // mixed mysqli_query ( mysqli $link , string $query [, int $resultmode = MYSQLI_STORE_RESULT ] )
        opencensus_trace_function('mysqli_query', function ($mysqli, $query) {
            return [
                'attributes' => ['query' => $query],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // mysqli_stmt mysqli_prepare ( mysqli $link , string $query )
        opencensus_trace_function('mysqli_prepare', function ($mysqli, $query) {
            return [
                'attributes' => ['query' => $query],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // bool mysqli_commit ( mysqli $link [, int $flags [, string $name ]] )
        opencensus_trace_function('mysqli_commit', function ($mysqli) {
            if (func_num_args() > 2) {
                return [
                    'attributes' => [
                        'name' => func_get_arg(2)
                    ],
                    'kind' => Span::KIND_CLIENT
                ];
            } else {
                return ['kind' => Span::KIND_CLIENT];
            }
        });

        // mysqli mysqli_connect ([ string $host = ini_get("mysqli.default_host")
        //      [, string $username = ini_get("mysqli.default_user")
        //      [, string $passwd = ini_get("mysqli.default_pw")
        //      [, string $dbname = ""
        //      [, int $port = ini_get("mysqli.default_port")
        //      [, string $socket = ini_get("mysqli.default_socket") ]]]]]] )
        opencensus_trace_function('mysqli_connect', function ($host) {
            return [
                'attributes' => ['host' => $host],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // bool mysqli_stmt_execute ( mysqli_stmt $stmt )
        opencensus_trace_function('mysqli_stmt_execute', function () {
            return ['kind' => Span::KIND_CLIENT];
        });

        // mixed mysqli::query ( string $query [, int $resultmode = MYSQLI_STORE_RESULT ] )
        opencensus_trace_method('mysqli', 'query', function ($mysqli, $query) {
            return [
                'attributes' => ['query' => $query],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // mysqli_stmt mysqli::prepare ( string $query )
        opencensus_trace_method('mysqli', 'prepare', function ($mysqli, $query) {
            return [
                'attributes' => ['query' => $query],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // bool mysqli::commit ([ int $flags [, string $name ]] )
        opencensus_trace_method('mysqli', 'commit', function ($mysqli) {
            if (func_num_args() > 1) {
                return [
                    'attributes' => [
                        'name' => func_get_arg(1)
                    ],
                    'kind' => Span::KIND_CLIENT
                ];
            } else {
                return ['kind' => Span::KIND_CLIENT];
            }
        });

        // mysqli::__construct ([ string $host = ini_get("mysqli.default_host")
        //      [, string $username = ini_get("mysqli.default_user")
        //      [, string $passwd = ini_get("mysqli.default_pw")
        //      [, string $dbname = ""
        //      [, int $port = ini_get("mysqli.default_port")
        //      [, string $socket = ini_get("mysqli.default_socket") ]]]]]] )
        opencensus_trace_method('mysqli', '__construct', function ($mysqli, $host) {
            return [
                'attributes' => ['host' => $host],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // bool mysqli_stmt::execute ( void )
        opencensus_trace_method('mysqli_stmt', 'execute', function () {
            return ['kind' => Span::KIND_CLIENT];
        });
    }
602512
public function loadVendorList()
    {
        $oBaseObject = $this->getBaseObject();
        $sFieldList = $oBaseObject->getSelectFields();
        $sViewName = $oBaseObject->getViewName();
        $this->getBaseObject()->setShowArticleCnt($this->_blShowVendorArticleCnt);

        $sWhere = '';
        if (!$this->isAdmin()) {
            $sWhere = $oBaseObject->getSqlActiveSnippet();
            $sWhere = $sWhere ? " where $sWhere and " : ' where ';
            $sWhere .= "{$sViewName}.oxtitle != '' ";
        }

        $sSelect = "select {$sFieldList} from {$sViewName} {$sWhere} order by {$sViewName}.oxtitle";
        $this->selectString($sSelect);
    }