PHP Class Xpressengine\Config\Repositories\DatabaseRepository

Author: XE Developers ([email protected])
Inheritance: implements Xpressengine\Config\ConfigRepository
Datei anzeigen Open project: xpressengine/xpressengine Class Usage Examples

Protected Properties

Property Type Description
$conn XpressEngine\Database\VirtualConnectionInterface DB connection instance
$table string using DB table name

Public Methods

Method Description
__construct ( XpressEngine\Database\VirtualConnectionInterface $conn ) constructor
affiliate ( ConfigEntity $config, string | null $to = null ) : void affiliated to another config
clearLike ( ConfigEntity $config, array $excepts = [] ) : void clear all just descendants vars
fetchAncestor ( string $siteKey, string $name ) : array search ancestors getter
fetchDescendant ( string $siteKey, string $name ) : array search descendants getter
find ( string $siteKey, string $name ) : ConfigEntity search getter
foster ( ConfigEntity $config, string | null $to = null ) : void Parent Changing with descendant
remove ( string $siteKey, string $name ) : void remove
save ( ConfigEntity $config ) : ConfigEntity save

Protected Methods

Method Description
createModel ( array $attributes ) : ConfigEntity make new object
insert ( ConfigEntity $config ) : ConfigEntity insert
update ( ConfigEntity $config ) : ConfigEntity update

Method Details

__construct() public method

constructor
public __construct ( XpressEngine\Database\VirtualConnectionInterface $conn )
$conn XpressEngine\Database\VirtualConnectionInterface DB connection instance

affiliate() public method

affiliated to another config
public affiliate ( ConfigEntity $config, string | null $to = null ) : void
$config Xpressengine\Config\ConfigEntity config object
$to string | null parent name
return void

clearLike() public method

clear all just descendants vars
public clearLike ( ConfigEntity $config, array $excepts = [] ) : void
$config Xpressengine\Config\ConfigEntity config object
$excepts array target to the except
return void

createModel() protected method

make new object
protected createModel ( array $attributes ) : ConfigEntity
$attributes array raw data
return Xpressengine\Config\ConfigEntity

fetchAncestor() public method

search ancestors getter
public fetchAncestor ( string $siteKey, string $name ) : array
$siteKey string site key
$name string the name
return array

fetchDescendant() public method

search descendants getter
public fetchDescendant ( string $siteKey, string $name ) : array
$siteKey string site key
$name string the name
return array

find() public method

search getter
public find ( string $siteKey, string $name ) : ConfigEntity
$siteKey string site key
$name string the name
return Xpressengine\Config\ConfigEntity

foster() public method

Parent Changing with descendant
public foster ( ConfigEntity $config, string | null $to = null ) : void
$config Xpressengine\Config\ConfigEntity config object
$to string | null to config prefix
return void

insert() protected method

insert
protected insert ( ConfigEntity $config ) : ConfigEntity
$config Xpressengine\Config\ConfigEntity config object
return Xpressengine\Config\ConfigEntity

remove() public method

remove
public remove ( string $siteKey, string $name ) : void
$siteKey string site key
$name string the name
return void

save() public method

save
public save ( ConfigEntity $config ) : ConfigEntity
$config Xpressengine\Config\ConfigEntity config object
return Xpressengine\Config\ConfigEntity

update() protected method

update
protected update ( ConfigEntity $config ) : ConfigEntity
$config Xpressengine\Config\ConfigEntity config object
return Xpressengine\Config\ConfigEntity

Property Details

$conn protected_oe property

DB connection instance
protected VirtualConnectionInterface,XpressEngine\Database $conn
return XpressEngine\Database\VirtualConnectionInterface

$table protected_oe property

using DB table name
protected string $table
return string