Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
updateclass.php File Reference

Go to the source code of this file.

Namespaces

 FDL
 

Variables

global $action
 
 $usage = new ApiUsage()
 
 $appClass
 
 $class
 
 $db = $usage->addOptionalParameter('dbcoord', "Database name", null, getDbAccess())
 
 $phpClass = sprintf("%s/%s/Class.%s.php", DEFAULT_PUBDIR, $appClass, $class)
 
 $o = new $class($db)
 
 $sql = array()
 
 $updateExistingTable = \Dcp\Core\PgInformationSchema::tableExists($o->dbaccess, 'public', $o->dbtable)
 
if($updateExistingTable) $point = uniqid(sprintf('%s/%s', $appClass, $class) , true)
 
if(($err=$o->savePoint($point))!==
'') if($updateExistingTable) 
else
 
if(($err=$o->commitPoint($point))!==
'') print nDone 
n
 

Variable Documentation

global $action

Definition at line 20 of file updateclass.php.

$appClass
Initial value:
= $usage->addOptionalParameter('appc', "application class folder", function ($value, $name)
{
if (!is_scalar($value)) {
return sprintf("Multiple values for '%s' not allowed.", $name);
}
if (strpos($value, DIRECTORY_SEPARATOR) !== false) {
return sprintf("Value for '%s' must not contain directory separator chars ('%s').", $name, DIRECTORY_SEPARATOR);
}
return '';
}
, 'WHAT')
$usage
Definition: updateclass.php:24
$value

Definition at line 27 of file updateclass.php.

$class
Initial value:
= $usage->addRequiredParameter('class', 'Class name', function ($value, $name)
{
if (!is_scalar($value)) {
return sprintf("Multiple values for '%s' not allowed.", $name);
}
if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $value)) {
return sprintf("Invalid class name '%s' for '%s'.", $value, $name, DIRECTORY_SEPARATOR);
}
return '';
})
$usage
Definition: updateclass.php:24
$value

Definition at line 38 of file updateclass.php.

$db = $usage->addOptionalParameter('dbcoord', "Database name", null, getDbAccess())

Definition at line 48 of file updateclass.php.

$o = new $class($db)

Definition at line 58 of file updateclass.php.

$phpClass = sprintf("%s/%s/Class.%s.php", DEFAULT_PUBDIR, $appClass, $class)

Definition at line 52 of file updateclass.php.

if ($updateExistingTable) $point = uniqid(sprintf('%s/%s', $appClass, $class) , true)

Definition at line 88 of file updateclass.php.

$sql = array()

Definition at line 60 of file updateclass.php.

$updateExistingTable = \Dcp\Core\PgInformationSchema::tableExists($o->dbaccess, 'public', $o->dbtable)

Definition at line 61 of file updateclass.php.

$usage = new ApiUsage()

Definition at line 24 of file updateclass.php.

if (($err=$o->savePoint($point))!== '') if ($updateExistingTable) else
Initial value:
{
print sprintf("Creating table '%s'...\n", $o->dbtable)
$o
Definition: updateclass.php:58
print
Definition: checklist.php:49

Definition at line 107 of file updateclass.php.

if (($err=$o->commitPoint($point))!== '') print nDone n

Definition at line 112 of file updateclass.php.

← centre documentaire © anakeen