Basicis - Core

Logo

As the name says, it is made to be basic and direct.

View the Project on GitHub basicis/core

Basicis\Model\DataBase

DataBase Class

Methods

| Name | Description | |——|————-| |__construct|Function __construct| |extractUrlParams|Function extractUrlParams Extract url a params to array ans return this| |getManager|Function getManager Get a instance of Doctrine ORM EntityManager an return this, or null| |isPath|Function isPath Check if string is a database path| |isUrl|Function isUrl Check if string is a database url| |setDBConfig|Function setDBConfig Set database configurations, driver, url and/or path (for sqlite)| |setORMConfig|Function setORMConfig Set database orm configurations, a array of entities paths and if is dev mode, for this, default value is true|

DataBase::__construct

Description

public __construct (void)

Function __construct

Parameters

This function has no parameters.

Return Values

void


DataBase::extractUrlParams

Description

public extractUrlParams (string $url)

Function extractUrlParams Extract url a params to array ans return this

Parameters

Return Values

array


DataBase::getManager

Description

public getManager (void)

Function getManager Get a instance of Doctrine ORM EntityManager an return this, or null

Parameters

This function has no parameters.

Return Values

\EntityManager|null


DataBase::isPath

Description

public isPath (string $url)

Function isPath Check if string is a database path

Parameters

Return Values

bool


DataBase::isUrl

Description

public isUrl (string $url)

Function isUrl Check if string is a database url

Parameters

Return Values

bool


DataBase::setDBConfig

Description

public setDBConfig (array $options)

Function setDBConfig Set database configurations, driver, url and/or path (for sqlite)

Parameters

Return Values

void


DataBase::setORMConfig

Description

public setORMConfig (array $entityPaths, bool $isDevMode)

Function setORMConfig Set database orm configurations, a array of entities paths and if is dev mode, for this, default value is true

Parameters

Return Values

void