本文整理汇总了PHP中ConfService::getRepository方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfService::getRepository方法的具体用法?PHP ConfService::getRepository怎么用?PHP ConfService::getRepository使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfService
的用法示例。
在下文中一共展示了ConfService::getRepository方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: filterActionsRegistry
private static function filterActionsRegistry(&$registry)
{
if (!AuthService::usersEnabled()) {
return false;
}
$loggedUser = AuthService::getLoggedUser();
if ($loggedUser == null) {
return false;
}
$crtRepo = ConfService::getRepository();
$crtRepoId = "ajxp.all";
if ($crtRepo != null && is_a($crtRepo, "Repository")) {
$crtRepoId = $crtRepo->getId();
}
$actionRights = $loggedUser->getSpecificActionsRights($crtRepoId);
$changes = false;
$xPath = new DOMXPath($registry);
foreach ($actionRights as $actionName => $enabled) {
if ($enabled !== false) {
continue;
}
$actions = $xPath->query("actions/action[@name='{$actionName}']");
if (!$actions->length) {
continue;
}
$action = $actions->item(0);
$action->parentNode->removeChild($action);
$changes = true;
}
return $changes;
}
示例2: applyAction
public function applyAction($actionName, $httpVars, $fileVars)
{
$messages = ConfService::getMessages();
if ($actionName == "index") {
$repository = ConfService::getRepository();
$repositoryId = $repository->getId();
$userSelection = new UserSelection($repository, $httpVars);
if ($userSelection->isEmpty()) {
$userSelection->addFile("/");
}
$nodes = $userSelection->buildNodes($repository->driverInstance);
if (isset($httpVars["verbose"]) && $httpVars["verbose"] == "true") {
$this->verboseIndexation = true;
}
if (ConfService::backgroundActionsSupported() && !ConfService::currentContextIsCommandLine()) {
AJXP_Controller::applyActionInBackground($repositoryId, "index", $httpVars);
AJXP_XMLWriter::header();
AJXP_XMLWriter::triggerBgAction("check_index_status", array("repository_id" => $repositoryId), sprintf($messages["core.index.8"], $nodes[0]->getPath()), true, 2);
if (!isset($httpVars["inner_apply"])) {
AJXP_XMLWriter::close();
}
return null;
}
// GIVE BACK THE HAND TO USER
session_write_close();
foreach ($nodes as $node) {
$dir = $node->getPath() == "/" || is_dir($node->getUrl());
// SIMPLE FILE
if (!$dir) {
try {
$this->logDebug("Indexing - node.index " . $node->getUrl());
AJXP_Controller::applyHook("node.index", array($node));
} catch (Exception $e) {
$this->logDebug("Error Indexing Node " . $node->getUrl() . " (" . $e->getMessage() . ")");
}
} else {
try {
$this->recursiveIndexation($node);
} catch (Exception $e) {
$this->logDebug("Indexation of " . $node->getUrl() . " interrupted by error: (" . $e->getMessage() . ")");
}
}
}
} else {
if ($actionName == "check_index_status") {
$repoId = $httpVars["repository_id"];
list($status, $message) = $this->getIndexStatus(ConfService::getRepositoryById($repoId), AuthService::getLoggedUser());
if (!empty($status)) {
AJXP_XMLWriter::header();
AJXP_XMLWriter::triggerBgAction("check_index_status", array("repository_id" => $repoId), $message, true, 3);
AJXP_XMLWriter::close();
} else {
AJXP_XMLWriter::header();
AJXP_XMLWriter::triggerBgAction("info_message", array(), $messages["core.index.5"], true, 5);
AJXP_XMLWriter::close();
}
}
}
return null;
}
示例3: init
function init($options)
{
parent::init($options);
$pServ = AJXP_PluginsService::getInstance();
$aPlugs = $pServ->getActivePlugins();
$accessPlugs = $pServ->getPluginsByType("access");
$this->repository = ConfService::getRepository();
foreach ($accessPlugs as $pId => $plug) {
if (array_key_exists("access." . $pId, $aPlugs) && $aPlugs["access." . $pId] === true) {
$this->accessDriver = $plug;
if (!isset($this->accessDriver->repository)) {
$this->accessDriver->init($this->repository);
$this->accessDriver->initRepository();
$wrapperData = $this->accessDriver->detectStreamWrapper(true);
} else {
$wrapperData = $this->accessDriver->detectStreamWrapper(false);
}
$this->urlBase = $wrapperData["protocol"] . "://" . $this->repository->getId();
}
}
$this->metaStore = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("metastore");
if ($this->metaStore !== false) {
$this->metaStore->initMeta($this->accessDriver);
}
}
示例4: postProcess
public function postProcess($action, $httpVars, $postProcessData)
{
if (self::$skipDecoding) {
}
if (!isset($httpVars["partitionRealName"])) {
return;
}
$repository = ConfService::getRepository();
if (!$repository->detectStreamWrapper(false)) {
return false;
}
$plugin = AJXP_PluginsService::findPlugin("access", $repository->getAccessType());
$streamData = $plugin->detectStreamWrapper(true);
$destStreamURL = $streamData["protocol"] . "://" . $repository->getId() . $httpVars["dir"] . "/";
$count = intval($httpVars["partitionCount"]);
$index = intval($httpVars["partitionIndex"]);
$fileId = $httpVars["fileId"];
$clientId = $httpVars["clientId"];
AJXP_Logger::debug("Should now rebuild file!", $httpVars);
$newDest = fopen($destStreamURL . $httpVars["partitionRealName"], "w");
for ($i = 0; $i < $count; $i++) {
$part = fopen($destStreamURL . "{$clientId}.{$fileId}.{$i}", "r");
while (!feof($part)) {
fwrite($newDest, fread($part, 4096));
}
fclose($part);
unlink($destStreamURL . "{$clientId}.{$fileId}.{$i}");
}
fclose($newDest);
}
示例5: unifyChunks
public function unifyChunks($action, $httpVars, $fileVars)
{
$repository = ConfService::getRepository();
if (!$repository->detectStreamWrapper(false)) {
return false;
}
$plugin = AJXP_PluginsService::findPlugin("access", $repository->getAccessType());
$streamData = $plugin->detectStreamWrapper(true);
$dir = AJXP_Utils::decodeSecureMagic($httpVars["dir"]);
$destStreamURL = $streamData["protocol"] . "://" . $repository->getId() . $dir . "/";
$filename = AJXP_Utils::decodeSecureMagic($httpVars["file_name"]);
$chunks = array();
$index = 0;
while (isset($httpVars["chunk_" . $index])) {
$chunks[] = AJXP_Utils::decodeSecureMagic($httpVars["chunk_" . $index]);
$index++;
}
$newDest = fopen($destStreamURL . $filename, "w");
for ($i = 0; $i < count($chunks); $i++) {
$part = fopen($destStreamURL . $chunks[$i], "r");
while (!feof($part)) {
fwrite($newDest, fread($part, 4096));
}
fclose($part);
unlink($destStreamURL . $chunks[$i]);
}
fclose($newDest);
}
示例6: switchAction
public function switchAction($action, $httpVars, $filesVars)
{
if (!isset($this->actions[$action])) {
return false;
}
$repository = ConfService::getRepository();
if (!$repository->detectStreamWrapper(true)) {
return false;
}
if (!isset($this->pluginConf)) {
$this->pluginConf = array("GENERATE_THUMBNAIL" => false);
}
$streamData = $repository->streamData;
$this->streamData = $streamData;
$destStreamURL = $streamData["protocol"] . "://" . $repository->getId();
if ($action == "preview_data_proxy") {
$file = AJXP_Utils::decodeSecureMagic($httpVars["file"]);
if (!file_exists($destStreamURL . $file)) {
header("Content-Type: " . AJXP_Utils::getImageMimeType(basename($file)) . "; name=\"" . basename($file) . "\"");
header("Content-Length: 0");
return;
}
if (isset($httpVars["get_thumb"]) && $this->getFilteredOption("GENERATE_THUMBNAIL", $repository->getId())) {
$dimension = 200;
if (isset($httpVars["dimension"]) && is_numeric($httpVars["dimension"])) {
$dimension = $httpVars["dimension"];
}
$this->currentDimension = $dimension;
$cacheItem = AJXP_Cache::getItem("diaporama_" . $dimension, $destStreamURL . $file, array($this, "generateThumbnail"));
$data = $cacheItem->getData();
$cId = $cacheItem->getId();
header("Content-Type: " . AJXP_Utils::getImageMimeType(basename($cId)) . "; name=\"" . basename($cId) . "\"");
header("Content-Length: " . strlen($data));
header('Cache-Control: public');
header("Pragma:");
header("Last-Modified: " . gmdate("D, d M Y H:i:s", time() - 10000) . " GMT");
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 5 * 24 * 3600) . " GMT");
print $data;
} else {
//$filesize = filesize($destStreamURL.$file);
$node = new AJXP_Node($destStreamURL . $file);
$fp = fopen($destStreamURL . $file, "r");
$stat = fstat($fp);
$filesize = $stat["size"];
header("Content-Type: " . AJXP_Utils::getImageMimeType(basename($file)) . "; name=\"" . basename($file) . "\"");
header("Content-Length: " . $filesize);
header('Cache-Control: public');
header("Pragma:");
header("Last-Modified: " . gmdate("D, d M Y H:i:s", time() - 10000) . " GMT");
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 5 * 24 * 3600) . " GMT");
$class = $streamData["classname"];
$stream = fopen("php://output", "a");
call_user_func(array($streamData["classname"], "copyFileInStream"), $destStreamURL . $file, $stream);
fflush($stream);
fclose($stream);
AJXP_Controller::applyHook("node.read", array($node));
}
}
}
示例7: switchAction
public function switchAction($action, $httpVars, $filesVars)
{
if (!isset($this->actions[$action])) {
return false;
}
$repository = ConfService::getRepository();
if (!$repository->detectStreamWrapper(true)) {
return false;
}
$streamData = $repository->streamData;
$destStreamURL = $streamData["protocol"] . "://" . $repository->getId();
if ($action == "post_to_server") {
$file = base64_decode(AJXP_Utils::decodeSecureMagic($httpVars["file"]));
$target = base64_decode($httpVars["parent_url"]) . "/plugins/editor.pixlr";
$tmp = call_user_func(array($streamData["classname"], "getRealFSReference"), $destStreamURL . $file);
$fData = array("tmp_name" => $tmp, "name" => urlencode(basename($file)), "type" => "image/jpg");
$httpClient = new HttpClient("pixlr.com");
//$httpClient->setDebug(true);
$postData = array();
$httpClient->setHandleRedirects(false);
$params = array("referrer" => "AjaXplorer", "method" => "get", "loc" => ConfService::getLanguage(), "target" => $target . "/fake_save_pixlr.php", "exit" => $target . "/fake_close_pixlr.php", "title" => urlencode(basename($file)), "locktarget" => "false", "locktitle" => "true", "locktype" => "source");
$httpClient->postFile("/editor/", $params, "image", $fData);
$loc = $httpClient->getHeader("location");
header("Location:{$loc}");
} else {
if ($action == "retrieve_pixlr_image") {
$file = AJXP_Utils::decodeSecureMagic($httpVars["original_file"]);
$url = $httpVars["new_url"];
$urlParts = parse_url($url);
$query = $urlParts["query"];
$params = array();
$parameters = parse_str($query, $params);
$image = $params['image'];
/*
$type = $params['type'];
$state = $params['state'];
$filename = $params['title'];
*/
if (strpos($image, "pixlr.com") == 0) {
throw new AJXP_Exception("Invalid Referrer");
}
$headers = get_headers($image, 1);
$content_type = explode("/", $headers['Content-Type']);
if ($content_type[0] != "image") {
throw new AJXP_Exception("File Type");
}
$orig = fopen($image, "r");
$target = fopen($destStreamURL . $file, "w");
while (!feof($orig)) {
fwrite($target, fread($orig, 4096));
}
fclose($orig);
fclose($target);
header("Content-Type:text/plain");
print $mess[115];
}
}
return;
}
示例8: switchActions
public function switchActions($actionName, $httpVars, $fileVars)
{
//$urlBase = $this->accessDriver
$repository = ConfService::getRepository();
if (!$repository->detectStreamWrapper(true)) {
return false;
}
if (!isset($this->pluginConf)) {
$this->pluginConf = array("GENERATE_THUMBNAIL" => false);
}
$streamData = $repository->streamData;
$this->streamData = $streamData;
$destStreamURL = $streamData["protocol"] . "://" . $repository->getId();
switch ($actionName) {
case "filehasher_signature":
$file = AJXP_Utils::decodeSecureMagic($httpVars["file"]);
if (!file_exists($destStreamURL . $file)) {
break;
}
$cacheItem = AJXP_Cache::getItem("signatures", $destStreamURL . $file, array($this, "generateSignature"));
$data = $cacheItem->getData();
header("Content-Type:application/octet-stream");
header("Content-Length", strlen($data));
echo $data;
break;
case "filehasher_delta":
case "filehasher_patch":
// HANDLE UPLOAD DATA
if (!isset($fileVars) && !is_array($fileVars["userfile_0"])) {
throw new Exception("These action should find uploaded data");
}
$uploadedData = tempnam(AJXP_Utils::getAjxpTmpDir(), $actionName . "-sig");
move_uploaded_file($fileVars["userfile_0"]["tmp_name"], $uploadedData);
$fileUrl = $destStreamURL . AJXP_Utils::decodeSecureMagic($httpVars["file"]);
$file = call_user_func(array($this->streamData["classname"], "getRealFSReference"), $fileUrl, true);
if ($actionName == "filehasher_delta") {
$signatureFile = $uploadedData;
$deltaFile = tempnam(AJXP_Utils::getAjxpTmpDir(), $actionName . "-delta");
rsync_generate_delta($signatureFile, $file, $deltaFile);
header("Content-Type:application/octet-stream");
header("Content-Length:" . filesize($deltaFile));
readfile($deltaFile);
unlink($signatureFile);
unlink($deltaFile);
} else {
$patched = $file . ".rdiff_patched";
$deltaFile = $uploadedData;
rsync_patch_file($file, $deltaFile, $patched);
rename($patched, $file);
header("Content-Type:text/plain");
unlink($deltaFile);
echo md5_file($file);
}
break;
}
}
示例9: switchAction
public function switchAction($action, $httpVars, $postProcessData)
{
if (!isset($this->actions[$action])) {
return false;
}
$repository = ConfService::getRepository();
if (!$repository->detectStreamWrapper(false)) {
return false;
}
$plugin = AJXP_PluginsService::findPlugin("access", $repository->getAccessType());
$streamData = $plugin->detectStreamWrapper(true);
$destStreamURL = $streamData["protocol"] . "://" . $repository->getId() . "/";
if ($action == "audio_proxy") {
$file = AJXP_Utils::decodeSecureMagic(base64_decode($httpVars["file"]));
$cType = "audio/" . array_pop(explode(".", $file));
$localName = basename($file);
header("Content-Type: " . $cType . "; name=\"" . $localName . "\"");
header("Content-Length: " . filesize($destStreamURL . $file));
$stream = fopen("php://output", "a");
call_user_func(array($streamData["classname"], "copyFileInStream"), $destStreamURL . $file, $stream);
fflush($stream);
fclose($stream);
$node = new AJXP_Node($destStreamURL . $file);
AJXP_Controller::applyHook("node.read", array($node));
//exit(1);
} else {
if ($action == "ls") {
if (!isset($httpVars["playlist"])) {
// This should not happen anyway, because of the applyCondition.
AJXP_Controller::passProcessDataThrough($postProcessData);
return;
}
// We transform the XML into XSPF
$xmlString = $postProcessData["ob_output"];
$xmlDoc = new DOMDocument();
$xmlDoc->loadXML($xmlString);
$xElement = $xmlDoc->documentElement;
header("Content-Type:application/xspf+xml;charset=UTF-8");
print '<?xml version="1.0" encoding="UTF-8"?>';
print '<playlist version="1" xmlns="http://xspf.org/ns/0/">';
print "<trackList>";
foreach ($xElement->childNodes as $child) {
$isFile = $child->getAttribute("is_file") == "true";
$label = $child->getAttribute("text");
$ar = explode(".", $label);
$ext = strtolower(end($ar));
if (!$isFile || $ext != "mp3") {
continue;
}
print "<track><location>" . AJXP_SERVER_ACCESS . "?secure_token=" . AuthService::getSecureToken() . "&get_action=audio_proxy&file=" . base64_encode($child->getAttribute("filename")) . "</location><title>" . $label . "</title></track>";
}
print "</trackList>";
AJXP_XMLWriter::close("playlist");
}
}
}
示例10: initMeta
public function initMeta($accessDriver)
{
require_once "VersionControl/Git.php";
$repo = ConfService::getRepository();
$this->repoBase = $repo->getOption("PATH");
if (!is_dir($this->repoBase . DIRECTORY_SEPARATOR . ".git")) {
$git = new VersionControl_Git($this->repoBase);
$git->initRepository();
}
}
示例11: filterRegistryFromRole
/**
* Check the current user "specificActionsRights" and filter the full registry actions with these.
* @static
* @param DOMDocument $registry
* @return bool
*/
public static function filterRegistryFromRole(&$registry)
{
if (!AuthService::usersEnabled()) {
return false;
}
$loggedUser = AuthService::getLoggedUser();
if ($loggedUser == null) {
return false;
}
$crtRepo = ConfService::getRepository();
$crtRepoId = AJXP_REPO_SCOPE_ALL;
// "ajxp.all";
if ($crtRepo != null && is_a($crtRepo, "Repository")) {
$crtRepoId = $crtRepo->getId();
}
$actionRights = $loggedUser->mergedRole->listActionsStatesFor($crtRepo);
$changes = false;
$xPath = new DOMXPath($registry);
foreach ($actionRights as $pluginName => $actions) {
foreach ($actions as $actionName => $enabled) {
if ($enabled !== false) {
continue;
}
$actions = $xPath->query("actions/action[@name='{$actionName}']");
if (!$actions->length) {
continue;
}
$action = $actions->item(0);
$action->parentNode->removeChild($action);
$changes = true;
}
}
$parameters = $loggedUser->mergedRole->listParameters();
foreach ($parameters as $scope => $paramsPlugs) {
if ($scope == AJXP_REPO_SCOPE_ALL || $scope == $crtRepoId || $crtRepo != null && $crtRepo->hasParent() && $scope == AJXP_REPO_SCOPE_SHARED) {
foreach ($paramsPlugs as $plugId => $params) {
foreach ($params as $name => $value) {
// Search exposed plugin_configs, replace if necessary.
$searchparams = $xPath->query("plugins/*[@id='{$plugId}']/plugin_configs/property[@name='{$name}']");
if (!$searchparams->length) {
continue;
}
$param = $searchparams->item(0);
$newCdata = $registry->createCDATASection(json_encode($value));
$param->removeChild($param->firstChild);
$param->appendChild($newCdata);
}
}
}
}
return $changes;
}
示例12: updateMetaShort
protected function updateMetaShort($file, $shortUrl)
{
$metaStore = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("metastore");
if ($metaStore !== false) {
$driver = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("access");
$metaStore->initMeta($driver);
$streamData = $driver->detectStreamWrapper(false);
$baseUrl = $streamData["protocol"] . "://" . ConfService::getRepository()->getId();
$node = new AJXP_Node($baseUrl . $file);
$metadata = $metaStore->retrieveMetadata($node, "ajxp_shared", true, AJXP_METADATA_SCOPE_REPOSITORY);
$metadata["short_form_url"] = $shortUrl;
$metaStore->setMetadata($node, "ajxp_shared", $metadata, true, AJXP_METADATA_SCOPE_REPOSITORY);
}
}
示例13: switchActions
public function switchActions($actionName, $httpVars, $fileVars)
{
if ($actionName != "changes" || !isset($httpVars["seq_id"])) {
return false;
}
require_once AJXP_BIN_FOLDER . "/dibi.compact.php";
dibi::connect($this->sqlDriver);
HTMLWriter::charsetHeader('application/json', 'UTF-8');
$res = dibi::query("SELECT\n [seq] , [ajxp_changes].[repository_identifier] , [ajxp_changes].[node_id] , [type] , [source] , [target] , [ajxp_index].[bytesize], [ajxp_index].[md5], [ajxp_index].[mtime], [ajxp_index].[node_path]\n FROM [ajxp_changes]\n LEFT JOIN [ajxp_index]\n ON [ajxp_changes].[node_id] = [ajxp_index].[node_id]\n WHERE [ajxp_changes].[repository_identifier] = %s AND [seq] > %i\n ORDER BY [ajxp_changes].[node_id], [seq] ASC", $this->computeIdentifier(ConfService::getRepository()), AJXP_Utils::sanitize($httpVars["seq_id"], AJXP_SANITIZE_ALPHANUM));
echo '{"changes":[';
$previousNodeId = -1;
$previousRow = null;
$order = array("path" => 0, "content" => 1, "create" => 2, "delete" => 3);
$relocateAttrs = array("bytesize", "md5", "mtime", "node_path", "repository_identifier");
foreach ($res as $row) {
$row->node = array();
foreach ($relocateAttrs as $att) {
$row->node[$att] = $row->{$att};
unset($row->{$att});
}
if ($row->node_id == $previousNodeId) {
$previousRow->target = $row->target;
$previousRow->seq = $row->seq;
if ($order[$row->type] > $order[$previousRow->type]) {
$previousRow->type = $row->type;
}
} else {
if (isset($previousRow) && ($previousRow->source != $previousRow->target || $previousRow->type == "content")) {
echo json_encode($previousRow) . ",";
}
$previousRow = $row;
$previousNodeId = $row->node_id;
}
$lastSeq = $row->seq;
flush();
}
if (isset($previousRow) && ($previousRow->source != $previousRow->target || $previousRow->type == "content")) {
echo json_encode($previousRow);
}
if (isset($lastSeq)) {
echo '], "last_seq":' . $lastSeq . '}';
} else {
$lastSeq = dibi::query("SELECT MAX([seq]) FROM [ajxp_changes]")->fetchSingle();
if (empty($lastSeq)) {
$lastSeq = 1;
}
echo '], "last_seq":' . $lastSeq . '}';
}
}
示例14: switchAction
public function switchAction($action, $httpVars, $filesVars)
{
if (!isset($this->actions[$action])) {
return false;
}
$repository = ConfService::getRepository();
if (!$repository->detectStreamWrapper(true)) {
return false;
}
if (!isset($this->pluginConf)) {
$this->pluginConf = array("GENERATE_THUMBNAIL" => false);
}
$streamData = $repository->streamData;
$destStreamURL = $streamData["protocol"] . "://" . $repository->getId();
if ($action == "preview_data_proxy") {
$file = AJXP_Utils::decodeSecureMagic($httpVars["file"]);
if (isset($httpVars["get_thumb"]) && $this->pluginConf["GENERATE_THUMBNAIL"]) {
require_once INSTALL_PATH . "/plugins/editor.diaporama/PThumb.lib.php";
$pThumb = new PThumb($this->pluginConf["THUMBNAIL_QUALITY"]);
if (!$pThumb->isError()) {
$pThumb->remote_wrapper = $streamData["classname"];
$pThumb->use_cache = $this->pluginConf["USE_THUMBNAIL_CACHE"];
$pThumb->cache_dir = $this->pluginConf["THUMBNAIL_CACHE_DIR"];
$pThumb->fit_thumbnail($destStreamURL . $file, 200);
if ($pThumb->isError()) {
print_r($pThumb->error_array);
AJXP_Logger::logAction("error", $pThumb->error_array);
}
//exit(0);
} else {
print_r($pThumb->error_array);
AJXP_Logger::logAction("error", $pThumb->error_array);
}
} else {
$filesize = filesize($destStreamURL . $file);
$fp = fopen($destStreamURL . $file, "r");
header("Content-Type: " . AJXP_Utils::getImageMimeType(basename($file)) . "; name=\"" . basename($file) . "\"");
header("Content-Length: " . $filesize);
header('Cache-Control: public');
$class = $streamData["classname"];
$stream = fopen("php://output", "a");
call_user_func(array($streamData["classname"], "copyFileInStream"), $destStreamURL . $file, $stream);
fflush($stream);
fclose($stream);
//exit(1);
}
}
}
示例15: __construct
public function __construct($repository)
{
$repositoryId = $repository->isWriteable() ? $repository->getUniqueId() : $repository->getId();
ConfService::switchRootDir($repositoryId);
$this->repository = ConfService::getRepository();
$this->options = new ezcWebdavFileBackendOptions();
$this->options['noLock'] = false;
$this->options['waitForLock'] = 200000;
$this->options['lockTimeout'] = 2;
$this->options['lockFileName'] = '.ezc_lock';
$this->options['propertyStoragePath'] = '.ezc';
$this->options['directoryMode'] = 0755;
$this->options['fileMode'] = 0644;
$this->options['useMimeExts'] = false;
$this->options['hideDotFiles'] = true;
}