CMC for PHP
  • Namespace
  • Class
  • Tree

Namespaces

  • cmc
    • core
      • ui
    • db
      • mysqli
    • error
    • ui
      • widgets
  • PHP

Classes

  • database
  • databasefactory
  • dataenv
  • dataquery
  • datatable

Interfaces

  • datasource
  • IBrowsable
  • ICreatable
  • IFilter
  • IMetaInfo
  • IPrimaryKey
  • IUpdatable

Exceptions

  • DatabaseException

CMC for PHP is a web framework for PHP.
Copyright (c) 2014 by Calmarsoft company http://calmarsoft.com (FRANCE). All rights reserved.
Project information available here.

Class dataenv

abstract data environment

Direct known subclasses

cmc\db\mysqli\dataenv_mysqli

Abstract
Namespace: cmc\db
Copyright: Copyright (c) Calmarsoft company (FRANCE) (http://calmarsoft.com)
License: GNU General Public License version 3
Version: 0.9
Link: CMC Project
Located at db/dataenv.php

Methods summary

public string
# getDatabaseFactory( )

defines the factory of this environment. It can be done by inheriting dataenv_xxx or putting a 'type' entry in config['db']

defines the factory of this environment. It can be done by inheriting dataenv_xxx or putting a 'type' entry in config['db']

Returns

string
databasefactory derived classname
public array
# getQueryMap( )

gets the query definition map: name=>sqltext

gets the query definition map: name=>sqltext

Returns

array
key=>query string queries inventory
public array
# getTables( )

associative array of envirnment direct tables key is the tablename, and value is an associative array of options (sort, filter, ...)

associative array of envirnment direct tables key is the tablename, and value is an associative array of options (sort, filter, ...)

Returns

array
public string
# getDatabaseName( )

retrieves the database value

retrieves the database value

default implementation takes value from config::val('db')['database']

Returns

string
public string
# getLogin( )

retrieves login name

retrieves login name

default implementation takes from config::val('db')['login']

Returns

string
public
# getPassword( )

retrieves password

retrieves password

default implementation takes from config::val('db')['password']

public
# getPort( )

retrieves port number

retrieves port number

default implementation takes from config::val('db')['port']

public
# getServerName( )

retrieves server name

retrieves server name

default implementation takes from config::val('db')['server']

public
# __construct( )
public cmc\db\database
# getConnectedDB( )

instantiates or retrieves a connected database according to current settings

instantiates or retrieves a connected database according to current settings

Returns

cmc\db\database
public cmc\db\datasource
# getQueryDS( string $objectName )

instantiates or retrieves a datasource from its name in the inventory

instantiates or retrieves a datasource from its name in the inventory

Parameters

$objectName
string
query name

Returns

cmc\db\datasource
public array
# getQueryFirst( string $qryName, array $params = false )

instantiates or retrieves a datasource from its name in the inventory, then executes it with parameters, and finally fetches the first record

instantiates or retrieves a datasource from its name in the inventory, then executes it with parameters, and finally fetches the first record

the result is an associative array of values

Parameters

$qryName
string
query name
$params
array
parameter values

Returns

array
public
# enableBenchMarking( )
public
# benchMarking( )
public
# executionBegin( )

used for debugging information: called by objects just before executing SQL statement

used for debugging information: called by objects just before executing SQL statement

public
# executionLog( type $sql, type $rows )

used for debugging information: called by objects just after executing SQL statement

used for debugging information: called by objects just after executing SQL statement

Parameters

$sql
type
$sql statement text
$rows
type
$rows affected rows or null
public
# getExecutionText( )
public cmc\db\datasource
# queryExecute( string $qryName, array $params = false )

instantiates or retrieves a datasource from its name in the inventory, then executes it with parameters

instantiates or retrieves a datasource from its name in the inventory, then executes it with parameters

the result is the executed datasource

Parameters

$qryName
string
query name
$params
array
parameter values

Returns

cmc\db\datasource
public
# OnSerialize( )

Magic methods summary

CMC for PHP API documentation generated by ApiGen 2.8.0