eZPublishCommunityProject(LegacyStack)  2013.5
flatten.php File Reference

Namespaces

 kernel
 Autoloader definition for eZ Publish Kernel files.
 

Variables

 $cli = eZCLI::instance()
 
 $dbHost = $options['db-host'] ? $options['db-host'] : false
 
 $dbImpl = $options['db-driver'] ? $options['db-driver'] : false
 
 $dbName = $options['db-database'] ? $options['db-database'] : false
 
 $dbPassword = $options['db-password'] ? $options['db-password'] : false
 
if(count($options['arguments'])< 1) $dbUser = $options['db-user'] ? $options['db-user'] : false
 
 $flatten
 
if($siteAccess) $flattenAllItems = false
 
 $flattenItems = array()
 
 $options
 
 $script
 
 $showSQL = $options['sql'] ? true : false
 
 $siteAccess = $options['siteaccess'] ? $options['siteaccess'] : false
 
foreach($options['arguments']
as $arg) if($flattenAllItems) 
else
 

Variable Documentation

$cli = eZCLI::instance()
$dbHost = $options['db-host'] ? $options['db-host'] : false
$dbImpl = $options['db-driver'] ? $options['db-driver'] : false
$dbPassword = $options['db-password'] ? $options['db-password'] : false
if (count($options['arguments'])< 1) $dbUser = $options['db-user'] ? $options['db-user'] : false
$flatten
Initial value:
= array( 'contentobject' => false,
'contentclass' => false,
'workflow' => false,
'role' => false )
if ($siteAccess) $flattenAllItems = false
$flattenItems = array()
$options
Initial value:
= $script->getOptions( "[db-host:][db-user:][db-password:][db-database:][db-type:|db-driver:][sql]",
"[name]",
array( 'db-host' => "Database host",
'db-user' => "Database user",
'db-password' => "Database password",
'db-database' => "Database name",
'db-driver' => "Database driver",
'db-type' => "Database driver, alias for --db-driver",
'sql' => "Display sql queries"
) )
$script
Definition: adddefaultstates.php:22
$script
Initial value:
= eZScript::instance( array( 'description' => ( "eZ Publish database flattening.\n\n" .
"Will remove data that is not considered currently in use to minimize the amount of database data it consumes\n" .
"\n" .
"Possible values for NAME is:\n" .
"contentobject, contentclass, workflow, role or all (for all items)\n" .
"flatten.php -s admin contentobject"),
'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
$showSQL = $options['sql'] ? true : false
foreach ($options['arguments'] as $arg) if ($flattenAllItems) else
Initial value:
{
if ( count( $flattenItems ) == 0 )
{
help();
exit;
}
foreach ( $flattenItems as $name )
{
$flatten[$name] = true;
}
}
{
if ( in_array( $siteAccess, eZINI::instance()->variable( 'SiteAccessSettings', 'AvailableSiteAccessList' ) ) )
{
$cli->output( "Using siteaccess $siteAccess for flatten" );
}
else
{
$cli->notice( "Siteaccess $siteAccess does not exist, using default siteaccess" );
}
}
if($siteAccess) changeSiteAccessSetting($siteAccess)
Definition: updateniceurls.php:75
$flattenItems
Definition: flatten.php:63
$db
Definition: adddefaultstates.php:36
static instance($databaseImplementation=false, $databaseParameters=false, $forceNewInstance=false)
Returns a shared instance of the eZDBInterface class aka database object.
Definition: ezdb.php:117
static instance()
Returns a shared instance of the eZCLI class.
Definition: ezcli.php:710
static instance($fileName= 'site.ini', $rootDir= 'settings', $useTextCodec=null, $useCache=null, $useLocalOverrides=null, $directAccess=false, $addArrayDefinition=false)
Returns a shared instance of the eZINI class pr $fileName, $rootDir and $useLocalOverrides param comb...
Definition: ezini.php:1826
help()
Definition: ezpm.php:24
$flatten
Definition: flatten.php:64
$siteAccess
Definition: flatten.php:54
$cli
Definition: adddefaultstates.php:14