PHP 클래스 N98\Magento\DbSettings

Database settings. The Magento database settings are stored in a SimpleXMLElement structure
상속: implements ArrayAcces\ArrayAccess, implements IteratorAggregat\IteratorAggregate
파일 보기 프로젝트 열기: netz98/n98-magerun 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $file )
getConfig ( ) : array content of previous $dbSettings field of the DatabaseHelper
getConnection ( ) : PDO Connects to the database without initializing magento
getDatabaseName ( ) : string
getDsn ( ) : string Get Mysql PDO DSN
getHost ( ) : string
getIterator ( ) : ArrayIterator
getMysqlClientToolConnectionString ( )
getPassword ( ) : string
getPort ( ) : string
getTablePrefix ( ) : string
getUnixSocket ( ) : string
getUsername ( ) : string
isSocketConnect ( ) : boolean
offsetExists ( $offset ) : boolean
offsetGet ( $offset ) : mixed
offsetSet ( mixed $offset, mixed $value )
offsetUnset ( mixed $offset )
setFile ( string $file )

비공개 메소드들

메소드 설명
parseResources ( SimpleXMLElement $resources ) helper method to parse config file segment related to the database settings
quoteIdentifier ( string $identifier ) : string Mysql quoting of an identifier

메소드 상세

__construct() 공개 메소드

public __construct ( string $file )
$file string path to app/etc/local.xml

getConfig() 공개 메소드

content of previous $dbSettings field of the DatabaseHelper
public getConfig ( ) : array
리턴 array

getConnection() 공개 메소드

Connects to the database without initializing magento
public getConnection ( ) : PDO
리턴 PDO

getDatabaseName() 공개 메소드

public getDatabaseName ( ) : string
리턴 string of the database identifier, null if not in use

getDsn() 공개 메소드

Get Mysql PDO DSN
public getDsn ( ) : string
리턴 string

getHost() 공개 메소드

public getHost ( ) : string
리턴 string hostname, null if there is no hostname setup (e.g. unix_socket)

getIterator() 공개 메소드

getMysqlClientToolConnectionString() 공개 메소드

getPassword() 공개 메소드

public getPassword ( ) : string
리턴 string password

getPort() 공개 메소드

public getPort ( ) : string
리턴 string port, null if not setup

getTablePrefix() 공개 메소드

public getTablePrefix ( ) : string
리턴 string table prefix, null if not in the settings (no or empty prefix)

getUnixSocket() 공개 메소드

public getUnixSocket ( ) : string
리턴 string unix socket, null if not in use

getUsername() 공개 메소드

public getUsername ( ) : string
리턴 string username

isSocketConnect() 공개 메소드

public isSocketConnect ( ) : boolean
리턴 boolean

offsetExists() 공개 메소드

public offsetExists ( $offset ) : boolean
리턴 boolean true on success or false on failure.

offsetGet() 공개 메소드

public offsetGet ( $offset ) : mixed
리턴 mixed Can return all value types.

offsetSet() 공개 메소드

public offsetSet ( mixed $offset, mixed $value )
$offset mixed
$value mixed

offsetUnset() 공개 메소드

public offsetUnset ( mixed $offset )
$offset mixed

setFile() 공개 메소드

public setFile ( string $file )
$file string path to app/etc/local.xml