public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "\nAvailable commands: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::knowledgebase_ezdebug: require_once "knowledgebase_ezdebug.php"; echo $knowledgeBaseString; break; case self::knowledgebase_vhost: if (!$eepCache->cacheKeyIsSet(eepCache::use_key_ezroot)) { throw new Exception("This requires 'eep use ezroot ...'"); } $ezRoot = $eepCache->readFromCache(eepCache::use_key_ezroot); require_once "knowledgebase_vhost.php"; $knowledgeBaseString = str_replace("<<<ezroot>>>", $ezRoot, $knowledgeBaseString); echo $knowledgeBaseString; break; case self::knowledgebase_sqltofixenglish: require_once "knowledgebase_resetlanguagesql.php"; echo $knowledgeBaseString; break; } }
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "\nAvailable commands:: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::trash_count: echo $this->trash_count() . "\n"; break; case self::trash_list: $this->trash_list(); break; } }
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; global $eepPath; $eepCache = eepCache::getInstance(); $availableModules = $eepCache->readFromCache(eepCache::misc_key_availablemodules); if (!in_array($command, $availableModules)) { throw new Exception("Command '" . $command . "' not recognized."); } switch ($command) { case "help": sort($availableModules); echo "\nAvailable modules: " . implode($availableModules, ", ") . "\n"; echo "\nModules path: " . $eepPath . "/modules/\n"; echo "\n" . $this->help . "\n"; $aliases = eep::getListOfAliases(); $table = array(); $table[] = array("Alias", "Command or Module"); foreach ($aliases as $alias => $full) { $table[] = array($alias, $full); } eep::printTable($table, "Available shortcuts"); break; default: // this is an infamous hack; redirect the request to a different // module, and the help function there global $argv; global $argc; $argv[1] = $command; // the module, not actually used $argv[2] = "help"; // the command, which is help global $eepPath; require_once $eepPath . "/modules/" . $command . "/index.php"; break; } }
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; $param3 = @$argv[5]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "\nAvailable commands:: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::crondaemon_addtask: if (0 == strlen($param1) || 0 == strlen($param2)) { throw new Exception("This requires at least two parameters."); } eep::addTask($param1, $param2, $param3); break; } }
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; $param3 = @$argv[5]; $param4 = @$argv[6]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "\nAvailable commands:: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::attribute_delete: $classIdentifier = $param1; $attributeIdentifier = $param2; AttributeFunctions::deleteAttribute($classIdentifier, $attributeIdentifier); break; case self::attribute_newattributexml: $attr = new AttributeFunctions(); echo $attr->newAttributeXML; break; case self::attribute_update: $classIdentifier = $param1; $xml = file_get_contents($param2); if (false === $xml) { throw new Exception("Failed to locate parameter xml file: '" . $param2 . "'"); } $dom = new DOMDocument(); $dom->preserveWhiteSpace = false; $loadResult = $dom->loadXML($xml); if (false === $loadResult) { throw new Exception("XML file '" . $param2 . "' does not contain valid XML"); } $xpath = new DOMXPath($dom); AttributeFunctions::updateAttribute($classIdentifier, $xpath); break; case self::attribute_setfield: $classIdentifier = $param1; $attributeIdentifier = $param2; $fieldIdentifier = $param3; $fieldValue = $param4; AttributeFunctions::setField($classIdentifier, $attributeIdentifier, $fieldIdentifier, $fieldValue); break; case self::attribute_info: $classIdentifier = $param1; $attributeIdentifier = $param2; $fieldIdentifier = $param3; AttributeFunctions::info($classIdentifier, $attributeIdentifier, $fieldIdentifier); break; case self::attribute_migrate: $classIdentifier = $param1; $srcAttribute = $param2; $conversion = $param3; $destAttribute = $param4; $classIdentifier = $eepCache->readFromCache(eepCache::use_key_contentclass); $this->attribute_migrate($classIdentifier, $srcAttribute, $conversion, $destAttribute); break; case self::attribute_fromstring: $contentObjectId = $param1; $attributeIdentifier = $param2; $newValue = $param3; AttributeFunctions::fromString($contentObjectId, $attributeIdentifier, $newValue); break; case self::attribute_tostring: $contentObjectId = $param1; $attributeIdentifier = $param2; echo AttributeFunctions::toString($contentObjectId, $attributeIdentifier) . "\n"; break; case self::attribute_createalias: $contentObjectId = $param1; $attributeIdentifier = $param2; $aliasName = $param3; echo AttributeFunctions::createAlias($contentObjectId, $attributeIdentifier, $aliasName) . "\n"; break; case self::attribute_contentobjectid: $contentObjectAttributeId = $param1; $version = $param2 ? $param2 : 1; echo AttributeFunctions::contentobjectid($contentObjectAttributeId, $version) . "\n"; break; } }
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "\nAvailable commands:: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::contentobject_info: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } if (!eepValidate::validateContentObjectId($objectId)) { throw new Exception("This is not an object id: [" . $objectId . "]"); } $this->fetchContentObjectFromId($objectId); break; case self::contentobject_datamap: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } if (!eepValidate::validateContentObjectId($objectId)) { throw new Exception("This is not an object id: [" . $objectId . "]"); } $this->fetchDataMapFromId($objectId); break; case self::contentobject_related: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } if (!eepValidate::validateContentObjectId($objectId)) { throw new Exception("This is not an object id: [" . $objectId . "]"); } $this->fetchRelated($objectId, false, $additional); break; case self::contentobject_reverserelated: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } if (!eepValidate::validateContentObjectId($objectId)) { throw new Exception("This is not an object id: [" . $objectId . "]"); } $this->fetchReverseRelated($objectId, $additional); break; case self::contentobject_delete: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } if (!eepValidate::validateContentObjectId($objectId)) { throw new Exception("This is not an object id: [" . $objectId . "]"); } $this->delete($objectId); break; case self::contentobject_contentnode: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } if (!eepValidate::validateContentObjectId($objectId)) { throw new Exception("This is not an object id: [" . $objectId . "]"); } echo $this->convertToNodeId($objectId) . "\n"; break; case self::contentobject_republish: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } if (!eepValidate::validateContentObjectId($objectId)) { throw new Exception("This is not an object id: [" . $objectId . "]"); } eep::republishObject($objectId); echo "republished " . $objectId . "\n"; break; case self::contentobject_clearcache: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } if (!eepValidate::validateContentObjectId($objectId)) { throw new Exception("This is not an object id: [" . $objectId . "]"); } $this->clearObjectCache($objectId); break; case self::contentobject_sitemapxml: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } if (!eepValidate::validateContentObjectId($objectId)) { throw new Exception("This is not an object id: [" . $objectId . "]"); } $this->sitemapxml($objectId, $param2, $param3, $param4); // objid, domain, change-frequency, priority break; case self::contentobject_deleteversions: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } if (!eepValidate::validateContentObjectId($objectId)) { throw new Exception("This is not an object id: [" . $objectId . "]"); } $this->deleteversions($objectId); break; case self::contentobject_fetchbyremoteid: $this->fetchbyremoteid($param1); break; } }
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "\nAvailable commands:: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::contentclassgroup_creategroup: if ($param1) { $groupIdentifier = $param1; $this->creategroup($groupIdentifier); } else { echo "Please specify the identifier for the content class group you are creating\n"; } break; case self::contentclassgroup_deletegroup: if ($param1) { $groupIdentifier = $param1; $this->deletegroup($groupIdentifier); } else { echo "Please specify the identifier for the content class group you are creating\n"; } break; case self::contentclassgroup_renamegroup: if ($param1 && $param2) { $groupIdentifier = $param1; $newGroupIdentifier = $param2; $this->renamegroup($groupIdentifier, $newGroupIdentifier); } else { echo "Please specify the identifiers of the group before and after renaming\n"; } break; case self::contentclassgroup_fetchall: $this->fetchall(); break; } }
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } if (!$this->isSolrRunning() && $command != self::ezfind_startsolr && $command != "help") { echo "solr is not available\n"; } else { $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "\nAvailable commands:: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::ezfind_advanced: $this->advanced($argv, $additional); break; case self::ezfind_indexobject: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } $this->indexobject($objectId); break; case self::ezfind_indexnode: $nodeId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $nodeId = $param1; } $this->indexnode($nodeId); break; case self::ezfind_isobjectindexed: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } $this->isobjectindexed($objectId); break; case self::ezfind_eject: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } $this->eject($objectId); break; case self::ezfind_fields: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } $this->fields($objectId); break; case self::ezfind_lastindexed: $objectId = $eepCache->readFromCache(eepCache::use_key_object); if ($param1) { $objectId = $param1; } $this->lastindexed($objectId); break; case self::ezfind_startsolr: $ezRootPath = $eepCache->readFromCache(eepCache::use_key_ezroot); $this->startsolr($ezRootPath); break; case self::ezfind_testquery: $this->testQuery($param1); break; } } }
$pathParts = pathinfo(__FILE__); $eepPath = $pathParts["dirname"]; if (file_exists(getenv("HOME") . "/eepSetting.php")) { require_once getenv("HOME") . "/eepSetting.php"; } elseif (file_exists(getenv("HOMEPATH") . "/eepSetting.php")) { require_once getenv("HOMEPATH") . "/eepSetting.php"; } else { require_once $eepPath . "/eepSetting.php"; } require_once $eepPath . "/lib/eepHelpers.php"; require_once $eepPath . "/lib/eepCache.php"; require_once $eepPath . "/lib/AttributeFunctions.php"; require_once $eepPath . "/lib/eepLog.php"; require_once $eepPath . "/lib/eepValidate.php"; $eepLogger = new eepLog(eepSetting::LogFolder, eepSetting::LogFile); $eepCache = eepCache::getInstance(); $argModule = "help"; // default module in case no other is requested if (isset($argv[1])) { // expand the module name into it's full name if using an alias $argv[1] = eep::expandAliases($argv[1]); $argModule = $argv[1]; } $argCommand = ""; if (isset($argv[2])) { // expand the function into it's full name if using an alias $argv[2] = eep::expandAliases($argv[2]); $argCommand = $argv[2]; } // make sure that the module is simple as a security precaution $argModule = str_replace(array("/", "\\", ".", ":"), "", $argModule);
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "\nAvailable commands:: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::contentclass_listattributes: $classIdentifier = $eepCache->readFromCache(eepCache::use_key_contentclass); if ($param1) { $classIdentifier = $param1; } AttributeFunctions::listAttributes($classIdentifier); break; case self::contentclass_deleteclass: $classIdentifier = $eepCache->readFromCache(eepCache::use_key_contentclass); if ($param1) { $classIdentifier = $param1; } $this->deleteClass($classIdentifier); break; case self::contentclass_fetchallinstances: $classIdentifier = $eepCache->readFromCache(eepCache::use_key_contentclass); if ($param1) { $classIdentifier = $param1; } $this->fetchallinstances($classIdentifier, $additional); break; case self::contentclass_appendtogroup: $classIdentifier = $eepCache->readFromCache(eepCache::use_key_contentclass); if ($param1) { $classIdentifier = $param1; } if ($param2) { $groupIdentifier = $param2; } else { $groupIdentifier = null; } $this->appendToGroup($classIdentifier, $groupIdentifier); break; case self::contentclass_removefromgroup: $classIdentifier = $eepCache->readFromCache(eepCache::use_key_contentclass); if ($param1) { $classIdentifier = $param1; } if ($param2) { $groupIdentifier = $param2; } else { $groupIdentifier = null; } $this->removeFromGroup($classIdentifier, $groupIdentifier); break; // eep createclass <Display name> <Content class group identifier> // eep createclass <Display name> <Content class group identifier> case self::contentclass_createclass: $displayName = $param1; // convert the display name to lowercase and solo underscores $classIdentifier = strtolower(trim($displayName)); $classIdentifier = preg_replace("/[^a-z0-9]/", "_", $classIdentifier); $classIdentifier = preg_replace("/_[_]+/", "_", $classIdentifier); if (0 == strlen($classIdentifier)) { throw new Exception("Empty content class identifier"); } $classId = eZContentClass::classIDByIdentifier($classIdentifier); if ($classId) { throw new Exception("This content class identifier is already used: '" . $classIdentifier . "'"); } $groupIdentifier = $param2; $groupObject = eZContentClassGroup::fetchByName($groupIdentifier); if (!is_object($groupObject)) { throw new Exception("Failed to locate the content class group '" . $groupIdentifier . "'"); } $groupId = $groupObject->ID; $this->createClass($displayName, $classIdentifier, $groupIdentifier, $groupId); echo "created " . $classIdentifier . " ok\n"; break; // eep contentclass setclassobjectidentifier <class identifier> <object naming string or pattern> // eep contentclass setclassobjectidentifier <class identifier> <object naming string or pattern> case self::contentclass_setclassobjectidentifier: $classIdentifier = $param1; $classId = eZContentClass::classIDByIdentifier($classIdentifier); $contentClass = eZContentClass::fetch($classId); if (!is_object($contentClass)) { throw new Exception("Failed to instantiate content class. [" . $classIdentifier . "]"); } $contentClass->setAttribute('contentobject_name', $param2); $contentClass->store(); break; case self::contentclass_setiscontainer: $classIdentifier = $param1; $classId = eZContentClass::classIDByIdentifier($classIdentifier); $contentClass = eZContentClass::fetch($classId); if (!is_object($contentClass)) { throw new Exception("Failed to instantiate content class. [" . $classIdentifier . "]"); } $newSetting = 0; if (0 != $param2) { $newSetting = 1; } $contentClass->setAttribute('is_container', $newSetting); $contentClass->store(); break; } }
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "'use' available keys: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::use_dump: $this->dumpCache(); break; case eepCache::use_key_contentclass: $contentClass = eZContentClass::fetchByIdentifier($param1); if (!$contentClass) { throw new Exception("This content class does not exist: [" . $param1 . "]"); } // note that a value == "" means to clear the setting $eepCache->writetoCache(eepCache::use_key_contentclass, $param1); break; case eepCache::use_key_contentnode: if (!eepValidate::validateContentNodeId($param1)) { throw new Exception("This is not an node id: [" . $param1 . "]"); } $eepCache->writetoCache(eepCache::use_key_contentnode, $param1); break; case eepCache::use_key_object: if (!eepValidate::validateContentObjectId($param1)) { throw new Exception("This is not an object id: [" . $param1 . "]"); } $eepCache->writetoCache(eepCache::use_key_object, $param1); break; case eepCache::use_key_attribute: // todo, verify that this is indeed a content class attribute $eepCache->writetoCache(eepCache::use_key_attribute, $param1); break; case eepCache::use_key_siteaccess: // todo, verify that this is indeed a site access $eepCache->writetoCache(eepCache::use_key_siteaccess, $param1); break; case eepCache::use_key_ezroot: if ("/" == substr($param1, 0, 1)) { // absolute path $eZPublishRootPath = $param1; } else { // relative path $eZPublishRootPath = getcwd() . "/" . $param1; } $eepCache->writetoCache(eepCache::use_key_ezroot, realpath($eZPublishRootPath)); // if you require this now, you might clash with an existing // autoload, so just save the new path in the cache, and the // next run will load the new autoload //require $eZPublishRootPath.'/autoload.php'; break; } }
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "\nAvailable commands:: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::list_contentclasses: $this->listContentClasses(); break; case self::list_attributes: $classIdentifier = $eepCache->readFromCache(eepCache::use_key_contentclass); if ($param1) { $classIdentifier = $param1; } AttributeFunctions::listAttributes($classIdentifier); break; case self::list_all_attributes: $this->listAllAttributes(); break; case self::list_children: $parentNodeId = $eepCache->readFromCache(eepCache::use_key_contentnode); if ($param1) { $parentNodeId = $param1; } $this->listChildNodes($parentNodeId, $additional); break; case self::list_siteaccesses: $this->listSiteAccesses(); break; case self::list_allinifiles: $this->allinifiles(); break; case self::list_subtree: $subtreeNodeId = $eepCache->readFromCache(eepCache::use_key_contentnode); if ($param1) { $subtreeNodeId = $param1; } $this->listSubtree($subtreeNodeId, $additional); break; case self::list_subtreeordered: $subtreeNodeId = $eepCache->readFromCache(eepCache::use_key_contentnode); if ($param1) { $subtreeNodeId = $param1; } $this->listSubtreeOrdered($subtreeNodeId, $additional); break; case self::list_extensions: $this->listExtensions(); break; } }
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "\nAvailable commands:: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::create_content: $classIdentifier = $eepCache->readFromCache(eepCache::use_key_contentclass); $parentNodeId = $eepCache->readFromCache(eepCache::use_key_contentnode); $this->createContentObject($classIdentifier, $parentNodeId, $param1); break; case self::create_quick: $nodeId = $param1; $classIdentifier = $param2; $this->create_quick($nodeId, $classIdentifier); break; } }
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; $param3 = @$argv[5]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "\nAvailable commands:: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::ezflow_find: if ($param1 == "ezpage") { $this->ezflow_find_ezpage(); } if ($param1 == "blocktype" && $param2) { $this->ezflow_find_blocktype($param2); } break; case self::ezflow_list: if ($param1 == "blocktypes") { $this->ezflow_list_blocktypes($param2); } break; } }
public function run($argv, $additional) { $command = @$argv[2]; $param1 = @$argv[3]; $param2 = @$argv[4]; $param3 = @$argv[5]; if (!in_array($command, $this->availableCommands)) { throw new Exception("Command '" . $command . "' not recognized."); } $eepCache = eepCache::getInstance(); switch ($command) { case "help": echo "\nAvailable commands:: " . implode(", ", $this->availableCommands) . "\n"; echo "\n" . $this->help . "\n"; break; case self::contentnode_info: $nodeId = $eepCache->readFromCache(eepCache::use_key_contentnode); if ($param1) { $nodeId = $param1; } $this->fetchNodeInfoFromId($nodeId); break; case self::contentnode_location: $contentObjectId = $eepCache->readFromCache(eepCache::use_key_object); $parentNodeId = $param1; $this->location($contentObjectId, $parentNodeId); break; case self::contentnode_find: $classIdentifier = $param1; $parentNodeId = $param2; $searchString = $param3; $this->searchForNodes($parentNodeId, $classIdentifier, $searchString); break; case self::contentnode_deletesubtree: $subtreeNodeId = $eepCache->readFromCache(eepCache::use_key_contentnode); if ($param1) { $subtreeNodeId = $param1; } $this->deleteSubtree($subtreeNodeId, $additional); break; case self::contentnode_contentobject: $nodeId = $eepCache->readFromCache(eepCache::use_key_contentnode); if ($param1) { $nodeId = $param1; } echo $this->convertToContentObjectId($nodeId); break; case self::contentnode_move: if ($param2) { // both the node and the parent are being provided $nodeId = $param1; $parentNodeId = $param2; } else { $nodeId = $eepCache->readFromCache(eepCache::use_key_contentnode); $parentNodeId = $param1; } $this->move($nodeId, $parentNodeId); break; case self::contentnode_clearsubtreecache: $nodeId = $eepCache->readFromCache(eepCache::use_key_contentnode); if ($param1) { $nodeId = $param1; } echo $this->clearSubtreeCache($nodeId); break; case self::contentnode_setsortorder: $nodeId = (int) $param1; $sortField = $param2; $sortOrder = $param3; $this->setSortOrder($nodeId, $sortField, $sortOrder); break; } }