OXID eShop CE  6.1.5
OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao Class Reference
+ Inheritance diagram for OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao:
+ Collaboration diagram for OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao:

Public Member Functions

 __construct ($database, $config)
 
 findAll ()
 
 delete ($id)
 
 findAppServer ($id)
 
 save ($appServer)
 
 startTransaction ()
 
 commitTransaction ()
 
 rollbackTransaction ()
 

Public Attributes

const CONFIG_NAME_FOR_SERVER_INFO = 'aServersData_'
 

Protected Member Functions

 update ($appServer)
 
 insert ($appServer)
 
 createServer ($data)
 

Protected Attributes

 $database
 

Private Member Functions

 selectDataById ($id)
 
 selectAllData ()
 
 getServerIdFromConfig ($varName)
 
 getValueFromConfig ($varValue)
 
 getServerParameter ($data, $name)
 
 convertAppServerToConfigOption ($appServer)
 

Private Attributes

 $appServer = []
 
 $config
 

Detailed Description

Application server data access manager.

Constructor & Destructor Documentation

◆ __construct()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::__construct (   $database,
  $config 
)

ApplicationServerDao constructor.

Parameters
\OxidEsales\Eshop\Core\Database\Adapter\DatabaseInterface$databaseDatabase connection class.
\OxidEsales\Eshop\Core\Config$configMain shop configuration class.

Member Function Documentation

◆ commitTransaction()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::commitTransaction ( )

Commit a database transaction.

◆ convertAppServerToConfigOption()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::convertAppServerToConfigOption (   $appServer)
private

Convert ApplicationServer object into simple array for saving into database oxconfig table.

Parameters
\OxidEsales\Eshop\Core\DataObject\ApplicationServer$appServerAn application server object.
Returns
array

◆ createServer()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::createServer (   $data)
protected

Creates ApplicationServer from given server id and data.

Parameters
array$dataThe array of server data.
Returns
\OxidEsales\Eshop\Core\DataObject\ApplicationServer

◆ delete()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::delete (   $id)

Deletes the entity with the given id.

Parameters
string$idAn id of the entity to delete.

◆ findAll()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::findAll ( )

Finds all application servers.

Returns
array

◆ findAppServer()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::findAppServer (   $id)

Finds an application server by given id, null if none is found.

Parameters
string$idAn id of the entity to find.
Returns
\OxidEsales\Eshop\Core\DataObject\ApplicationServer|null

◆ getServerIdFromConfig()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::getServerIdFromConfig (   $varName)
private

Parses config option name to get the server id.

Parameters
string$varNameThe name of the config option.
Returns
string The id of server.

◆ getServerParameter()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::getServerParameter (   $data,
  $name 
)
private

Gets server parameter.

Parameters
array$dataThe array of server data.
string$nameThe name of searched parameter.
Returns
mixed

◆ getValueFromConfig()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::getValueFromConfig (   $varValue)
private

Unserializes config option value.

Parameters
string$varValueThe serialized value of the config option.
Returns
array The information of server.

◆ insert()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::insert (   $appServer)
protected

Insert new application server entity.

Parameters
\OxidEsales\Eshop\Core\DataObject\ApplicationServer$appServer

◆ rollbackTransaction()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::rollbackTransaction ( )

RollBack a database transaction.

◆ save()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::save (   $appServer)

Updates or insert the given entity.

Parameters
\OxidEsales\Eshop\Core\DataObject\ApplicationServer$appServer

◆ selectAllData()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::selectAllData ( )
private

Returns all application server entities from database.

Returns
\OxidEsales\Eshop\Core\Database\Adapter\ResultSetInterface

◆ selectDataById()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::selectDataById (   $id)
private

Returns all application server entities from database.

Parameters
string$idAn id of the entity to find.
Returns
string

◆ startTransaction()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::startTransaction ( )

Start a database transaction.

◆ update()

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::update (   $appServer)
protected

Updates the given entity.

Parameters
\OxidEsales\Eshop\Core\DataObject\ApplicationServer$appServer

Member Data Documentation

◆ $appServer

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::$appServer = []
private

◆ $config

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::$config
private

◆ $database

OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::$database
protected

◆ CONFIG_NAME_FOR_SERVER_INFO

const OxidEsales\EshopCommunity\Core\Dao\ApplicationServerDao::CONFIG_NAME_FOR_SERVER_INFO = 'aServersData_'

The name of config option for saving servers data information.


The documentation for this class was generated from the following file: