eZPublishCommunityProject(LegacyStack)  2013.5
ezsqlinsertschema.php File Reference

Namespaces

 kernel
 Autoloader definition for eZ Publish Kernel files.
 

Functions

if(strlen(trim($type))==0) if(!$onlyCleanupSchema
and(!file_exists($filename)
or!is_file($filename))) if(strlen(trim($user))==0) 
eZTriedDatabaseString ($database, $host, $user, $password, $socket)
 

Variables

 $cli = eZCLI::instance()
 
 $db
 
 $dbSchema = eZDbSchema::instance( $schemaArray )
 
switch(count($options['arguments'])) $dbschemaParameters
 
 $host = $options['host']
 
 $includeData = false
 
 $includeSchema = true
 
if($options['insert-types']) $onlyCleanupSchema = $options['clean-existing'] && !$includeSchema && !$includeData
 
 $options
 
 $parameters
 
 $password = $options['password']
 
 $port = $options['port']
 
if(!is_object($db)) if(!$db
or!$db->isConnected()) 
$schemaArray = eZDbSchema::read( $filename, true )
 
if($includeData and!$options['schema-file'])
if($options['schema-file']) if($includeSchema
and(!isset($schemaArray['schema'])
or!$schemaArray['schema'])) if($schemaArray===false
$schemaArray ['type'] = $type
 
if($options['clean-existing']) $schemaArray ['instance'] =& $db
 
 $script
 
 $socket = $options['socket']
 
if($dbSchema===false$status = ( $includeSchema or $includeData ) ? $dbSchema->insertSchema( $dbschemaParameters ) : true
 
 $type = $options['type']
 
 $user = $options['user']
 

Function Documentation

if (strlen(trim($type))==0) if (!$onlyCleanupSchema and(!file_exists($filename) or!is_file($filename))) if (strlen(trim($user))==0) eZTriedDatabaseString (   $database,
  $host,
  $user,
  $password,
  $socket 
)

Variable Documentation

$cli = eZCLI::instance()
$db
Initial value:
true )
static instance($databaseImplementation=false, $databaseParameters=false, $forceNewInstance=false)
Returns a shared instance of the eZDBInterface class aka database object.
Definition: ezdb.php:117
$parameters
Definition: ezsqlinsertschema.php:181
$type
Definition: ezsqldumpschema.php:61
$dbSchema = eZDbSchema::instance( $schemaArray )
switch (count($options['arguments'])) $dbschemaParameters
Initial value:
= array( 'schema' => $includeSchema,
'data' => $includeData,
'format' => 'local',
'table_type' => $options['table-type'],
'table_charset' => $options['table-charset'],
'allow_multi_insert' => $options['allow-multi-insert'] )
switch(count($options['arguments'])) $includeSchema
Definition: ezsqldumpschema.php:91
$includeData
Definition: ezsqldumpschema.php:92
$options
Definition: adddefaultstates.php:31
$host = $options['host']
$includeData = false
$includeSchema = true
if ($options['insert-types']) $onlyCleanupSchema = $options['clean-existing'] && !$includeSchema && !$includeData
$options
Initial value:
= $script->getOptions( "[type:][user:][host:][password;][port:][socket:]" .
"[table-type:][table-charset:]" .
"[insert-types:][allow-multi-insert][schema-file:][clean-existing]",
"[filename][database]",
array( 'type' => ( "Which database type to use, can be one of:\n" .
"mysql, postgresql or any other supported by extensions" ),
'host' => "Connect to host database",
'user' => "User for login to database",
'password' => "Password to use when connecting to database",
'port' => 'Port to connect to database',
'socket' => 'Socket to connect to match and database (only for MySQL)',
'table-type' => ( "The table storage type to use when creating tables.\n" .
"MySQL: bdb, innodb and myisam\n" .
"PostgreSQL: \n" .
"Oracle: " ),
'clean-existing' => 'Clean up existing schema (remove all database objects)',
'table-charset' => 'Defines the charset to use on tables, the names of the charset depends on database type',
'schema-file' => 'The schema file to use when importing data structures, is only required when importing a schema',
'allow-multi-insert' => ( 'Will create INSERT statements with multiple data entries (applies to data import only)' . "\n" .
'Multi-inserts will only be created for databases that support it' ),
'insert-types' => ( "A comma separated list of types to import (default is schema only):\n" .
"schema - Table schema\n" .
"data - Table data\n" .
"all - Both table schema and data\n" .
"none - Insert nothing (useful if you want to clean up schema only)" )
) )
$script
Definition: adddefaultstates.php:22
$parameters
Initial value:
= array( 'server' => $host,
'user' => $user,
'password' => $password,
'database' => $database )
$user
Definition: ezconvertmysqltabletype.php:40
$password
Definition: ezconvertmysqltabletype.php:42
$database
Definition: ezconvertmysqltabletype.php:43
$host
Definition: ezconvertmysqltabletype.php:39

Referenced by eZInstallScriptPackageHandler\add(), eZDBPackageHandler\add(), eZFilePackageHandler\add(), eZExtensionPackageHandler\add(), eZContentClassPackageHandler\add(), eZContentObjectPackageHandler\add(), eZStaticCache\addAction(), eZPHPCreator\addCodePiece(), eZPHPCreator\addComment(), eZPHPCreator\addDefine(), eZPDFTable\addDocSpecFunction(), eZPHPCreator\addInclude(), eZPHPCreator\addMethodCall(), eZPHPCreator\addVariable(), eZPHPCreator\addVariableUnset(), eZPHPCreator\addVariableUnsetList(), eZImageManager\analyzeImage(), eZPackage\appendDependency(), eZPackage\appendInstall(), eZImageObject\appendLayer(), eZPackage\appendProvides(), eZCodeTemplate\apply(), eZTemplateArrayOperator\arrayTrans(), eZContentObjectTreeNode\availableClassListJsArray(), eZTemplateArithmeticOperator\basicTransformation(), eZTemplateCompiler\boundVariableName(), eZContentBrowse\browse(), eZContentCache\cachePathInfo(), eZImageObject\calculatePosition(), eZPDFTable\callFrameLine(), eZTemplateArithmeticOperator\castTransformation(), eZTemplateLogicOperator\chooseTransformation(), eZContentObject\cleanupInternalDrafts(), eZTemplateArrayOperator\compareTrans(), eZTemplateCompiler\compileTemplate(), eZTemplateTextOperator\concatTransformation(), eZTemplateControlOperator\condTransform(), eZImageManager\convert(), eZWorkflowProcess\create(), eZPackage\create(), eZNodeAssignment\create(), eZTemplateNodeTool\createAssignFromOutputVariableNode(), eZTemplateNodeTool\createCodePieceNode(), eZTemplateNodeTool\createErrorNode(), eZImageManager\createImageAlias(), eZOperationMemento\createKey(), eZWorkflowProcess\createKey(), eZTemplateNodeTool\createNamespaceChangeNode(), eZTemplateNodeTool\createNamespaceRestoreNode(), eZTemplateNodeTool\createOperatorElement(), eZTemplateNodeTool\createOutputVariableDecreaseNode(), eZTemplateNodeTool\createOutputVariableIncreaseNode(), eZHTTPTool\createRedirectUrl(), eZTemplateNodeTool\createResourceAcquisitionNode(), eZTemplateNodeTool\createSpacingDecreaseNode(), eZTemplateNodeTool\createSpacingIncreaseNode(), eZTemplateNodeTool\createVariableNode(), eZTemplateNodeTool\createVariableUnsetNode(), eZTemplateNodeTool\createWarningNode(), eZTemplateNodeTool\createWriteToOutputVariableNode(), eZModule\currentAction(), eZModule\currentRedirectionURI(), eZTemplateCompiler\currentTextName(), eZContentObjectAttribute\customHTTPAction(), eZTemplateStringOperator\customMapTransformation(), eZAuthorType\customObjectAttributeHTTPAction(), eZMultiOption2Type\customObjectAttributeHTTPAction(), eZObjectRelationType\customObjectAttributeHTTPAction(), eZObjectRelationListType\customObjectAttributeHTTPAction(), eZTemplateLocaleOperator\dateTimeTransformation(), eZTemplateArithmeticOperator\decIncTransformation(), eZCodeMapper\decodeCommand(), eZPackage\dependencyItems(), eZSimpleShippingType\execute(), eZWaitUntilDateType\execute(), eZApproveType\execute(), eZStaticCache\executeActions(), eZModuleOperationInfo\executeBody(), eZContentCache\exists(), eZPDFTable\extractFunction(), eZTemplateNodeTool\extractNodes(), eZPDFTable\extractParameters(), eZTemplateArrayOperator\extractTrans(), eZAppendWarningItem(), eZCollaborationItemHandler\eZCollaborationItemHandler(), eZDBInterface\eZDBInterface(), eZMySQLiDB\eZMySQLiDB(), eZNullDB\eZNullDB(), eZPackage\eZPackage(), eZPackageHandler\eZPackageHandler(), eZPostgreSQLDB\eZPostgreSQLDB(), eZSiteInstaller\eZSiteInstaller(), eZSOAPRequest\eZSOAPRequest(), eZTemplateCompiledLoop\eZTemplateCompiledLoop(), eZContentFunctionCollection\fetchContentSearch(), eZPackage\fetchFromFile(), eZCollaborationItemMessageLink\fetchItemCount(), eZCollaborationItemMessageLink\fetchItemList(), eZURLFunctionCollection\fetchList(), eZTrigger\fetchList(), eZURL\fetchList(), eZCollaborationItem\fetchList(), eZContentClassAttribute\fetchList(), eZContentObjectTreeNode\fetchList(), eZURLFunctionCollection\fetchListCount(), eZURL\fetchListCount(), eZCollaborationItem\fetchListCount(), eZCollaborationItem\fetchListTool(), eZUser\fetchLoggedInList(), eZURLObjectLink\fetchObjectVersionList(), eZPackage\fetchPackages(), eZCollaborationItemParticipantLink\fetchParticipantList(), eZCollaborationItemParticipantLink\fetchParticipantMap(), eZSearchFunctionCollection\fetchSearchList(), eZTemplateExecuteOperator\fetchTransform(), eZExtension\findExtensionType(), eZModule\forward(), eZTemplateCompiler\generatePHPCode(), eZTemplateCompiler\generatePHPCodeChildren(), eZTemplateCompiler\generateVariableDataCode(), eZTemplateLocaleOperator\getTimeTransformation(), eZImageObject\getTransparency(), eZImageObject\getTransparencyPercent(), eZCharTransform\groupCommands(), eZSubTreeHandler\handle(), eZCollaborationNotificationHandler\handle(), eZGeneralDigestHandler\handle(), eZCollaborationNotificationHandler\handleCollaborationEvent(), eZCollaborationItemHandler\handleCollaborationEvent(), eZModule\handleError(), eZURL\handleList(), eZSubTreeHandler\handlePublishEvent(), eZTemplateDigestOperator\hashTransformation(), eZMail\headers(), eZMail\headerText(), eZMail\headerTextList(), eZi18nOperator\i18nTrans(), eZTemplateTextOperator\indentTransformation(), eZImageObject\initializeAxis(), eZStepCreateSites\initializePackage(), eZURLOperator\iniTrans(), eZFilePackageHandler\install(), eZDBPackageHandler\install(), eZExtensionPackageHandler\install(), eZContentObjectPackageHandler\installFetchAliases(), eZContentObjectPackageHandler\installOverrides(), eZTemplateTypeOperator\isTransform(), eZCollaborationGroup\itemCount(), eZCollaborationGroup\itemList(), eZTemplateLocaleOperator\l10nTransformation(), loadDatabaseSchema(), eZTemplateLogicOperator\logicalComparisonTransformation(), eZContentOperationCollection\loopNodeAssignment(), eZTemplateLocaleOperator\makeDateTimeTransformation(), eZTemplateArrayOperator\mergeTrans(), eZTemplateArithmeticOperator\minMaxTransformation(), eZPDF\modify(), eZTemplateLocaleOperator\modify(), eZTemplateStringOperator\modify(), eZTemplateArithmeticOperator\modTransformation(), eZSearchLog\mostFrequentPhraseArray(), eZTemplateLogicOperator\negateTransformation(), eZTemplateNl2BrOperator\nl2brTransformation(), eZTemplateUnitOperator\operatorTransform(), eZPackage\packageRepositories(), eZPackage\parseDOMTree(), eZTemplateStringOperator\phpMapTransformation(), eZTemplatePHPOperator\phpOperatorTransformation(), eZKernelOperator\preferencesTransformation(), eZImageObject\prependLayer(), eZGIFImageAnalyzer\process(), eZEXIFImageAnalyzer\process(), eZTemplateBlockFunction\process(), eZTemplateSetFunction\process(), eZTemplateDebugFunction\process(), eZTemplateSectionFunction\process(), eZTemplateArithmeticOperator\randTransformation(), eZHTTPTool\redirect(), eZModule\redirect(), eZModule\redirectionURI(), eZModule\redirectionURIForModule(), eZModule\redirectModule(), eZModule\redirectToView(), eZContentCache\restore(), eZTemplateArithmeticOperator\romanTransformation(), eZTemplateArithmeticOperator\roundTransformation(), eZModule\run(), eZModule\runHooks(), eZTrigger\runTrigger(), eZMailNotificationTransport\send(), eZSMTPTransport\sendMail(), eZCollaborationNotificationHandler\sendMessage(), eZSubTreeHandler\sendMessage(), eZContentObjectAttribute\setInputParameters(), eZPackage\setParameters(), eZContentObjectAssignmentHandler\setupAssignments(), eZContentObjectAttribute\setValidationParameters(), eZContentCache\store(), eZCollaborationGroup\subTree(), eZTemplateSequenceFunction\templateNodeSequenceCreate(), eZObjectForwarder\templateNodeTransformation(), eZTemplateMenuFunction\templateNodeTransformation(), eZTemplateToolbarFunction\templateNodeTransformation(), eZTemplateCacheFunction\templateNodeTransformation(), eZTemplateIncludeFunction\templateNodeTransformation(), eZTemplateDoFunction\templateNodeTransformation(), eZTemplateWhileFunction\templateNodeTransformation(), eZTemplateIfFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), eZTemplateForFunction\templateNodeTransformation(), eZTemplateDefFunction\templateNodeTransformation(), eZTemplateForeachFunction\templateNodeTransformation(), eZTemplateSequenceFunction\templateNodeTransformation(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), eZTemplateDebugFunction\templateNodeTransformation(), eZTemplateSwitchFunction\templateNodeTransformation(), testPHPIni(), eZPHPCreator\thisVariableText(), eZTemplateLogicOperator\trueFalseTransformation(), updateINI_1_2_0(), eZPersistentObject\updateObjectList(), eZContentUpload\upload(), eZURLOperator\urlTransformation(), eZContentObject\validateInput(), eZObjectRelationListType\validateObjectAttributeHTTPInput(), eZPHPCreator\variableText(), eZContentObject\versions(), eZTemplateStringOperator\washTransformation(), eZPHPCreator\writeCodePiece(), eZPHPCreator\writeDefine(), eZPHPCreator\writeInclude(), eZPHPCreator\writeMethodCall(), eZPHPCreator\writeVariableUnset(), and eZPHPCreator\writeVariableUnsetList().

$password = $options['password']
$port = $options['port']
if (!is_object($db)) if (!$db or!$db->isConnected()) $schemaArray = eZDbSchema::read( $filename, true )
if ($includeData and!$options['schema-file']) if ($options['schema-file']) if ($includeSchema and(!isset($schemaArray['schema']) or!$schemaArray['schema'])) if ($schemaArray===false) $schemaArray['type'] = $type
if ($options['clean-existing']) $schemaArray['instance'] =& $db
$script
Initial value:
= eZScript::instance( array( 'description' => ( "eZ Publish SQL Schema insert\n\n" .
"Insert database schema and data to specified database\n".
"ezsqlinsertschema.php --type=mysql --user=root share/db_schema.dba ezp35stable" ),
'use-session' => false,
'use-modules' => true,
'use-extensions' => true ) )
static instance($settings=array())
Returns a shared instance of the eZScript class.
Definition: ezscript.php:1084
$socket = $options['socket']
if ($dbSchema===false) $status = ( $includeSchema or $includeData ) ? $dbSchema->insertSchema( $dbschemaParameters ) : true

Referenced by eZISBN10To13Converter\addAllClasses(), eZISBN10To13Converter\addAttribute(), eZISBN10To13Converter\addClass(), eZWorkflowProcess\advance(), eZImageManager\analyzeImage(), ezpRestOauthAuthenticationStyle\authenticate(), eZContentOperationCollection\changeTranslationAvailableStatus(), eZApproveType\checkApproveCollaboration(), eZMySQLiDB\checkCharsetPriv(), ezpContentPublishingQueueProcessor\childSignalHandler(), eZContentObjectVersion\cloneVersion(), eZMySQLiDB\connect(), eZContentObject\copyVersion(), eZCollaborationItem\create(), eZCurrencyData\create(), eZContentObject\createNewVersion(), eZContentObject\createNewVersionIn(), ezpRestAuthController\doOauthRequired(), eZModuleOperationInfo\executeBody(), eZModuleOperationInfo\executeTrigger(), Cezpdf\ezInsertMode(), Cezpdf\ezPRVTaddPageNumbers(), eZRSSExportItem\fetch(), eZRSSImport\fetch(), eZRSSExport\fetch(), eZShopFunctionCollection\fetchCurrencyList(), eZRSSExportItem\fetchFilteredList(), eZWorkflowProcess\fetchForStatus(), eZContentObjectVersion\fetchForUser(), eZCollaborationFunctionCollection\fetchItemCount(), eZCollaborationFunctionCollection\fetchItemList(), eZRSSExport\fetchItems(), eZRSSImport\fetchList(), eZContentFunctionCollection\fetchObjectCountByUserID(), eZContentObject\fetchObjectCountByUserID(), eZSectionFunctionCollection\fetchObjectList(), eZSectionFunctionCollection\fetchObjectListCount(), eZOrderStatusHistory\fetchOrderStatusName(), ezpContentPublishingProcess\fetchProcesses(), eZISBN13\formatedISBNValue(), eZSubTreeHandler\handle(), eZCollaborationNotificationHandler\handle(), eZApproveCollaborationHandler\handleCustomAction(), eZContentUpload\handleLocalFile(), eZContentUpload\handleUpload(), eZStepCreateSites\initializePackage(), eZImageType\insertHTTPFile(), eZImageType\insertRegularFile(), eZDBSchemaInterface\insertSchema(), eZScript\iterate(), eZLintSchema\lintCheckSchema(), eZTSTranslator\loadTranslationFile(), eZWebDAVContentBackend\performDelete(), eZHTTPTool\redirect(), eZFile\rename(), ezpNativeUserAuthFilter\run(), ezpOauthFilter\run(), eZModule\runHooks(), eZModule\setRedirectStatus(), eZCurrencyData\setStatus(), eZOrder\setStatus(), eZContentOperationCollection\setVersionStatus(), eZOrder\statusModificationList(), eZWorkflowType\statusName(), eZWorkflow\statusName(), eZCurrencyData\statusStringToNumeric(), testPHPIni(), eZApproveCollaborationHandler\unreadMessageCount(), eZContentObjectVersion\unserialize(), eZContentObject\validateInput(), eZISBNType\validateISBN13Checksum(), eZISBNType\validateObjectAttributeHTTPInput(), and eZObjectRelationListType\validateObjectAttributeHTTPInput().

$type = $options['type']
$user = $options['user']