当前位置: 首页>>代码示例>>PHP>>正文


PHP AJXP_Logger::info方法代码示例

本文整理汇总了PHP中AJXP_Logger::info方法的典型用法代码示例。如果您正苦于以下问题:PHP AJXP_Logger::info方法的具体用法?PHP AJXP_Logger::info怎么用?PHP AJXP_Logger::info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AJXP_Logger的用法示例。


在下文中一共展示了AJXP_Logger::info方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveTemporaryData

 /**
  * Save Temporary Data.
  * Implementation uses serialised files because of the overhead incurred with a full db implementation.
  *
  * @param $key String key of data to save.
  * @param $value Value to save
  */
 public function saveTemporaryData($key, $value)
 {
     $dirPath = $this->storage->getOption("USERS_DIRPATH");
     if ($dirPath == "") {
         $dirPath = AJXP_INSTALL_PATH . "/data/users";
         AJXP_Logger::info(__CLASS__, "setTemporaryData", array("Warning" => "The conf.sql driver is missing a mandatory option USERS_DIRPATH!"));
     }
     $id = AuthService::ignoreUserCase() ? strtolower($this->getId()) : $this->getId();
     AJXP_Utils::saveSerialFile($dirPath . "/" . $id . "/temp-" . $key . ".ser", $value);
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:17,代码来源:class.AJXP_SqlUser.php

示例2: deleteUser

 /**
  * Delete a user in the auth/conf driver impl
  * @static
  * @param $userId
  * @return bool
  */
 public static function deleteUser($userId)
 {
     $userId = AuthService::filterUserSensitivity($userId);
     AJXP_Controller::applyHook("user.before_delete", array($userId));
     $authDriver = ConfService::getAuthDriverImpl();
     $authDriver->deleteUser($userId);
     $subUsers = array();
     ConfService::getConfStorageImpl()->deleteUser($userId, $subUsers);
     foreach ($subUsers as $deletedUser) {
         $authDriver->deleteUser($deletedUser);
     }
     AJXP_Controller::applyHook("user.after_delete", array($userId));
     AJXP_Logger::info(__CLASS__, "Delete User", array("user_id" => $userId, "sub_user" => implode(",", $subUsers)));
     return true;
 }
开发者ID:biggtfish,项目名称:cms,代码行数:21,代码来源:class.AuthService.php

示例3: deleteRepositoryInst

 /**
  * See static method
  * @param $repoId
  * @return int
  */
 public function deleteRepositoryInst($repoId)
 {
     AJXP_Controller::applyHook("workspace.before_delete", array($repoId));
     $confStorage = self::getConfStorageImpl();
     $res = $confStorage->deleteRepository($repoId);
     if ($res == -1) {
         return $res;
     }
     AJXP_Controller::applyHook("workspace.after_delete", array($repoId));
     AJXP_Logger::info(__CLASS__, "Delete Repository", array("repo_id" => $repoId));
     $this->invalidateLoadedRepositories();
 }
开发者ID:rcmarotz,项目名称:pydio-core,代码行数:17,代码来源:class.ConfService.php

示例4: deleteRepositoryInst

 /**
  * See static method
  * @param $repoId
  * @return int
  */
 public function deleteRepositoryInst($repoId)
 {
     AJXP_Controller::applyHook("workspace.before_delete", array($repoId));
     $confStorage = self::getConfStorageImpl();
     $shares = $confStorage->listRepositoriesWithCriteria(array("parent_uuid" => $repoId));
     $toDelete = array();
     foreach ($shares as $share) {
         $toDelete[] = $share->getId();
     }
     $res = $confStorage->deleteRepository($repoId);
     if ($res == -1) {
         return $res;
     }
     foreach ($toDelete as $deleteId) {
         $this->deleteRepositoryInst($deleteId);
     }
     AJXP_Controller::applyHook("workspace.after_delete", array($repoId));
     AJXP_Logger::info(__CLASS__, "Delete Repository", array("repo_id" => $repoId));
     $this->invalidateLoadedRepositories();
     return 0;
 }
开发者ID:ad-m,项目名称:pydio-core,代码行数:26,代码来源:class.ConfService.php

示例5: setPTGStorage

 private function setPTGStorage()
 {
     switch (strtolower($this->pgt_storage_mode)) {
         case 'file':
             phpCAS::setPGTStorageFile(session_save_path());
             break;
         case 'db':
             $dbconfig = ConfService::getConfStorageImpl();
             /**
              * support only for mySQL
              */
             if ($dbconfig instanceof sqlConfDriver) {
                 if (!empty($dbconfig->sqlDriver["username"])) {
                     $db_username = $dbconfig->sqlDriver["username"];
                     $db_password = $dbconfig->sqlDriver["password"];
                     $db_database = "mysql:" . "dbname=" . $dbconfig->sqlDriver["database"] . ";host=" . $dbconfig->sqlDriver["host"];
                     $db_table = "ajxp_cas_pgt";
                     AJXP_Logger::info(__CLASS__, __FUNCTION__, $db_database);
                     phpCAS::setPGTStorageDB($db_database, $db_username, $db_password, $db_table, "");
                 }
             }
             break;
         default:
             break;
     }
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:26,代码来源:class.CasAuthFrontend.php

示例6: rename

 public function rename($url_from, $url_to)
 {
     $url_from = smb::cleanUrl($url_from);
     $url_to = smb::cleanUrl($url_to);
     list($from, $to) = array(smb::parse_url($url_from), smb::parse_url($url_to));
     if ($from['host'] != $to['host'] || $from['share'] != $to['share'] || $from['user'] != $to['user'] || $from['pass'] != $to['pass'] || $from['domain'] != $to['domain']) {
         trigger_error('rename(): FROM & TO must be in same server-share-user-pass-domain', E_USER_ERROR);
     }
     if ($from['type'] != 'path' || $to['type'] != 'path') {
         trigger_error('rename(): error in URL', E_USER_ERROR);
     }
     smb::clearstatcache($url_from);
     $res = smb::execute('rename "' . $from['path'] . '" "' . $to['path'] . '"', $to);
     if (empty($res)) {
         return true;
     }
     AJXP_Logger::info(__CLASS__, "SmbClient rename error: " . $res);
     return false;
 }
开发者ID:rcmarotz,项目名称:pydio-core,代码行数:19,代码来源:smb.php

示例7: macerrorSftp

function macerrorSftp($packet)
{
    AJXP_Logger::info(__CLASS__, "SSH2.FTP.macerror", "");
    throw new Exception('SSH2.FTP : macerror' . $packet);
}
开发者ID:andy737,项目名称:pydio-core,代码行数:5,代码来源:class.sftpAccessWrapper.php

示例8: getRemoteUsers

 protected function getRemoteUsers()
 {
     $result = $this->apiCall('GET', 'users');
     $map = array();
     foreach ($result->body as $user) {
         if ($user->state == 'active') {
             $map[$user->username] = '';
         }
     }
     AJXP_Logger::info(__CLASS__ . '.getRemoteUsers', json_encode(array_keys($map)), "");
     return $map;
 }
开发者ID:Beanow,项目名称:auth.gitlab,代码行数:12,代码来源:class.gitlabAuthDriver.php

示例9: httpPut


//.........这里部分代码省略.........
 protected function httpPut($uri)
 {
     $body = $this->httpRequest->getBody();
     // Intercepting Content-Range
     if ($this->httpRequest->getHeader('Content-Range')) {
         /**
         Content-Range is dangerous for PUT requests:  PUT per definition
         stores a full resource.  draft-ietf-httpbis-p2-semantics-15 says
         in section 7.6:
           An origin server SHOULD reject any PUT request that contains a
           Content-Range header field, since it might be misinterpreted as
           partial content (or might be partial content that is being mistakenly
           PUT as a full representation).  Partial content updates are possible
           by targeting a separately identified resource with state that
           overlaps a portion of the larger resource, or by using a different
           method that has been specifically defined for partial updates (for
           example, the PATCH method defined in [RFC5789]).
         This clarifies RFC2616 section 9.6:
           The recipient of the entity MUST NOT ignore any Content-*
           (e.g. Content-Range) headers that it does not understand or implement
           and MUST return a 501 (Not Implemented) response in such cases.
         OTOH is a PUT request with a Content-Range currently the only way to
         continue an aborted upload request and is supported by curl, mod_dav,
         Tomcat and others.  Since some clients do use this feature which results
         in unexpected behaviour (cf PEAR::HTTP_WebDAV_Client 1.0.1), we reject
         all PUT requests with a Content-Range for now.
         */
         throw new Exception\NotImplemented('PUT with Content-Range is not allowed.');
     }
     // Intercepting the Finder problem
     if (($expected = $this->httpRequest->getHeader('X-Expected-Entity-Length')) && $expected > 0) {
         /**
         Many webservers will not cooperate well with Finder PUT requests,
         because it uses 'Chunked' transfer encoding for the request body.
         
         The symptom of this problem is that Finder sends files to the
         server, but they arrive as 0-length files in PHP.
         
         If we don't do anything, the user might think they are uploading
         files successfully, but they end up empty on the server. Instead,
         we throw back an error if we detect this.
         
         The reason Finder uses Chunked, is because it thinks the files
         might change as it's being uploaded, and therefore the
         Content-Length can vary.
         
         Instead it sends the X-Expected-Entity-Length header with the size
         of the file at the very start of the request. If this header is set,
         but we don't get a request body we will fail the request to
         protect the end-user.
         */
         // Only reading first byte
         $firstByte = fread($body, 1);
         if (strlen($firstByte) !== 1) {
             throw new Exception\Forbidden('This server is not compatible with OS/X finder. Consider using a different WebDAV client or webserver.');
         }
         // The body needs to stay intact, so we copy everything to a
         // temporary stream.
         $newBody = fopen('php://temp', 'r+');
         fwrite($newBody, $firstByte);
         stream_copy_to_stream($body, $newBody);
         rewind($newBody);
         $body = $newBody;
     }
     if ($this->tree->nodeExists($uri)) {
         $node = $this->tree->getNodeForPath($uri);
         // Checking If-None-Match and related headers.
         if (!$this->checkPreconditions()) {
             return;
         }
         // If the node is a collection, we'll deny it
         if (!$node instanceof IFile) {
             throw new Exception\Conflict('PUT is not allowed on non-files.');
         }
         if (!$this->broadcastEvent('beforeWriteContent', array($uri, $node, &$body))) {
             return false;
         }
         $etag = $node->put($body);
         $this->broadcastEvent('afterWriteContent', array($uri, $node));
         $this->httpResponse->setHeader('Content-Length', '0');
         if ($etag) {
             $this->httpResponse->setHeader('ETag', $etag);
         }
         $this->httpResponse->sendStatus(204);
     } else {
         $etag = null;
         // If we got here, the resource didn't exist yet.
         if (!$this->createFile($this->getRequestUri(), $body, $etag)) {
             // For one reason or another the file was not created.
             return;
         }
         $this->httpResponse->setHeader('Content-Length', '0');
         if ($etag) {
             $this->httpResponse->setHeader('ETag', $etag);
         }
         $this->httpResponse->sendStatus(201);
     }
     $repositories = \ConfService::getRepositoriesList("user");
     \AJXP_Logger::info(__CLASS__, "Upload", array("files" => $repositories[\ConfService::getCurrentRepositoryId()]->getSlug() . "/" . $uri));
 }
开发者ID:biggtfish,项目名称:cms,代码行数:101,代码来源:Server.php

示例10: deleteRepositoryInst

 /**
  * See static method
  * @param $repoId
  * @return int
  */
 public function deleteRepositoryInst($repoId)
 {
     $confStorage = self::getConfStorageImpl();
     $res = $confStorage->deleteRepository($repoId);
     if ($res == -1) {
         return $res;
     }
     AJXP_Logger::info(__CLASS__, "Delete Repository", array("repo_id" => $repoId));
     $this->invalidateLoadedRepositories();
 }
开发者ID:biggtfish,项目名称:cms,代码行数:15,代码来源:class.ConfService.php


注:本文中的AJXP_Logger::info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。