This method is used to tell phpCAS to store the response of the
CAS server to PGT requests onto the filesystem.

@param string $path the path where the PGT's should be stored

@return void
504732
public static function setPGTStorageFile($path = '')
    {
        phpCAS :: traceBegin();
        phpCAS::_validateProxyExists();

        try {
            self::$_PHPCAS_CLIENT->setPGTStorageFile($path);
        } catch (Exception $e) {
            phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
        }
        phpCAS :: traceEnd();
    }
268048
public function load($path)
    {
        $tests = $this->getTests($path);
        foreach ($tests as $test) {
            $this->context->setFile($test);
            include $test;
        }
    }
666415
public static function put($path, $callback)
    {
        self::instance()->addRoute('PUT', $path, self::callback($callback));
    }
507881
public function put($path, $params = []){
        $json = json_encode($params);
        
        return $this->_call('PUT', $path, $json);
    }
1129389
public function XServeAsDownload($path){

        $this->isFileOrDie($path);

        $this->downloadHeaders($path);
        $this->XServe($path);

    }
885388
public function setPath(string $path = null)
    {
        if ($path === null) {
            $uri = $this->server->get('REQUEST_URI');

            if (empty($uri)) {
                // Default to a slash
                $this->path = '/';
            } else {
                $uriParts = explode('?', $uri);
                $this->path = $uriParts[0];
            }
        } else {
            $this->path = $path;
        }
    }
982085
public static function registerPath($path)
    {
        $path = realpath($path);
        if (!in_array($path, self::$paths)) {
            self::$paths[] = $path;
            self::$cache   = null;
        }
    }
543509
public function back_getCatCacheKeys($path)
    {
        $result = CatCacheRpcProxy::getRpc()->getKeys($path);
        $this->autoSend($result);
    }
1041844
public function setPath($path)
    {
        if (!file_exists($path))
        {
            mkdir($path, 0777, true);
        }

        $this->path = $path;
    }
1347583
protected function purge($path)
	{
		$directory = pathinfo($path, PATHINFO_DIRNAME);
		while ($directory != $this->uploadPath)
		{
			if (count(glob($directory .'/*')))
			{
				break;
			}

			rmdir($directory);
			$directory = dirname($directory);
		}
	}
1321763
function lock($path) {
        $this->_path = $this->translate_uri($path);
        $this->header_unset();
        $this->create_basic_request('LOCK');
        $this->header_add('Timeout: Infinite');
        $this->header_add('Content-type: text/xml');
        // create the xml request ...
        $xml =  "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n";
        $xml .= "<D:lockinfo xmlns:D='DAV:'\r\n>";
        $xml .= "  <D:lockscope><D:exclusive/></D:lockscope>\r\n";
        $xml .= "  <D:locktype><D:write/></D:locktype>\r\n";
        $xml .= "  <D:owner>\r\n";
        $xml .= "    <D:href>".($this->_user)."</D:href>\r\n";
        $xml .= "  </D:owner>\r\n";
        $xml .= "</D:lockinfo>\r\n";
        $this->header_add('Content-length: ' . strlen($xml));
        $this->send_request();
        // send also xml
        fputs($this->sock, $xml);
        $this->get_respond();
        $response = $this->process_respond();
        // validate the response ... (only basic validation)
        // check http-version
        if ($response['status']['http-version'] == 'HTTP/1.1' ||
            $response['status']['http-version'] == 'HTTP/1.0') {
            /* seems to be http ... proceed
            rfc 2518 says:
            200 (OK) - The lock request succeeded and the value of the lockdiscovery property is included in the body.
            412 (Precondition Failed) - The included lock token was not enforceable on this resource or the server could not satisfy the
                     request in the lockinfo XML element.
            423 (Locked) - The resource is locked, so the method has been rejected.
             */

                switch($response['status']['status-code']) {
                case 200:
                    // collection was successfully locked... see xml response to get lock token...
                    if (strcmp($response['header']['Content-Type'], 'text/xml; charset="utf-8"') == 0) {
                        // ok let's get the content of the xml stuff
                        $this->_parser = xml_parser_create_ns();
                        $this->_parserid = (int) $this->_parser;
                        // forget old data...
                        unset($this->_lock[$this->_parserid]);
                        unset($this->_xmltree[$this->_parserid]);
                        xml_parser_set_option($this->_parser,XML_OPTION_SKIP_WHITE,0);
                        xml_parser_set_option($this->_parser,XML_OPTION_CASE_FOLDING,0);
                        xml_set_object($this->_parser, $this);
                        xml_set_element_handler($this->_parser, "_lock_startElement", "_endElement");
                        xml_set_character_data_handler($this->_parser, "_lock_cdata");

                        if (!xml_parse($this->_parser, $response['body'])) {
                            die(sprintf("XML error: %s at line %d",
                                xml_error_string(xml_get_error_code($this->_parser)),
                                xml_get_current_line_number($this->_parser)));
                        }

                        // Free resources
                        xml_parser_free($this->_parser);
                        // add status code to array
                        $this->_lock[$this->_parserid]['status'] = 200;
                        return $this->_lock[$this->_parserid];

                    } else {
                        print 'Missing Content-Type: text/xml header in response.<br>';
                    }
                    return false;

                default:
                    // hmm. not what we expected. Just return what we got from webdav server
                    // someone else has to handle it.
                    $this->_lock['status'] = $response['status']['status-code'];
                    return $this->_lock;
                }
            }


    }
643351
public function post($path, $params = []){
        $json = json_encode($params);
        
        return $this->_call('POST', $path, $json);
    }
703390
private function attemptRegistration($path)
    {
        try {
            if (class_exists($path)) {
                $this->application->add(new $path());
            }
        } catch (Exception $e) {
            echo "Unable to autoload the '$path' command.";
        }
    }
245057
protected function _checkSetSecurKey($path = null) {
		if (empty($path) && !file_exists($path)) {
			return false;
		}

		$checkResult = true;
		$File = new File($path . 'Config' . DS . 'core.php');
		$contents = $File->read();
		if (empty($contents)) {
			return false;
		}

		$patterns = [
			'/(?<![\/]{2})Configure::write\(\'Security.salt\',[\s\'A-z0-9]*\);/',
			'/(?<![\/]{2})Configure::write\(\'Security.cipherSeed\',[\s\'A-z0-9]*\);/',
			'/(?<![\/]{2})Configure::write\(\'Security.key\',[\s\'A-z0-9]*\);/'
		];
		foreach ($patterns as $pattern) {
			$checkResult = $checkResult && (bool)preg_match($pattern, $contents);
		}

		return $checkResult;
	}
10161
protected function put(string $path, array $params = [], array $headers = [])
    {
        $body = self::createJsonBody($params);

        if ($body) {
            $headers = self::addJsonContentType($headers);
        }

        return $this->putRaw($path, $body, $headers);
    }
744212
public function post($path=null,$parameters=null)
    {
        if($parameters){
            foreach($parameters as $key=>$parameter)
                $this->addFormParameter($key,$parameter);
        }
        return $this->startRequest('POST', $path);
    }
450723
public function check($path)
    {
        foreach ($this->getFiles($path) as $file) {
            $this->checkFile($file);
        }
    }