本文整理汇总了PHP中OCP\IURLGenerator::linkToDocs方法的典型用法代码示例。如果您正苦于以下问题:PHP IURLGenerator::linkToDocs方法的具体用法?PHP IURLGenerator::linkToDocs怎么用?PHP IURLGenerator::linkToDocs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OCP\IURLGenerator
的用法示例。
在下文中一共展示了IURLGenerator::linkToDocs方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
/**
* {@inheritdoc }
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$path = $input->getOption('path');
$privateKeyPath = $input->getOption('privateKey');
$keyBundlePath = $input->getOption('certificate');
if (is_null($path) || is_null($privateKeyPath) || is_null($keyBundlePath)) {
$documentationUrl = $this->urlGenerator->linkToDocs('developer-code-integrity');
$output->writeln('This command requires the --path, --privateKey and --certificate.');
$output->writeln('Example: ./occ integrity:sign-app --path="/Users/lukasreschke/Programming/myapp/" --privateKey="/Users/lukasreschke/private/myapp.key" --certificate="/Users/lukasreschke/public/mycert.crt"');
$output->writeln('For more information please consult the documentation: ' . $documentationUrl);
return null;
}
$privateKey = $this->fileAccessHelper->file_get_contents($privateKeyPath);
$keyBundle = $this->fileAccessHelper->file_get_contents($keyBundlePath);
if ($privateKey === false) {
$output->writeln(sprintf('Private key "%s" does not exists.', $privateKeyPath));
return null;
}
if ($keyBundle === false) {
$output->writeln(sprintf('Certificate "%s" does not exists.', $keyBundlePath));
return null;
}
$rsa = new RSA();
$rsa->loadKey($privateKey);
$x509 = new X509();
$x509->loadX509($keyBundle);
$x509->setPrivateKey($rsa);
$this->checker->writeAppSignature($path, $x509, $rsa);
$output->writeln('Successfully signed "' . $path . '"');
}
示例2: parse
/**
* @param string $file the xml file to be loaded
* @return null|array where null is an indicator for an error
*/
public function parse($file)
{
if (!file_exists($file)) {
return null;
}
libxml_use_internal_errors(true);
$loadEntities = libxml_disable_entity_loader(false);
$xml = simplexml_load_file($file);
libxml_disable_entity_loader($loadEntities);
if ($xml == false) {
libxml_clear_errors();
return null;
}
$array = $this->xmlToArray($xml);
if (is_null($array)) {
return null;
}
if (!array_key_exists('info', $array)) {
$array['info'] = array();
}
if (!array_key_exists('remote', $array)) {
$array['remote'] = array();
}
if (!array_key_exists('public', $array)) {
$array['public'] = array();
}
if (!array_key_exists('types', $array)) {
$array['types'] = array();
}
if (array_key_exists('documentation', $array) && is_array($array['documentation'])) {
foreach ($array['documentation'] as $key => $url) {
// If it is not an absolute URL we assume it is a key
// i.e. admin-ldap will get converted to go.php?to=admin-ldap
if (!$this->httpHelper->isHTTPURL($url)) {
$url = $this->urlGenerator->linkToDocs($url);
}
$array['documentation'][$key] = $url;
}
}
if (array_key_exists('types', $array)) {
if (is_array($array['types'])) {
foreach ($array['types'] as $type => $v) {
unset($array['types'][$type]);
if (is_string($type)) {
$array['types'][] = $type;
}
}
} else {
$array['types'] = array();
}
}
return $array;
}
示例3: check
/**
* @return DataResponse
*/
public function check() {
return new DataResponse(
[
'serverHasInternetConnection' => $this->isInternetConnectionWorking(),
'dataDirectoryProtected' => $this->util->isHtaccessWorking($this->config),
'isMemcacheConfigured' => $this->isMemcacheConfigured(),
'memcacheDocs' => $this->urlGenerator->linkToDocs('admin-performance'),
'isUrandomAvailable' => $this->isUrandomAvailable(),
'securityDocs' => $this->urlGenerator->linkToDocs('admin-security'),
]
);
}
示例4: check
/**
* @return DataResponse
*/
public function check()
{
return new DataResponse(['serverHasInternetConnection' => $this->isInternetConnectionWorking(), 'isMemcacheConfigured' => $this->isMemcacheConfigured(), 'memcacheDocs' => $this->urlGenerator->linkToDocs('admin-performance'), 'isUrandomAvailable' => $this->isUrandomAvailable(), 'securityDocs' => $this->urlGenerator->linkToDocs('admin-security'), 'isUsedTlsLibOutdated' => $this->isUsedTlsLibOutdated(), 'phpSupported' => $this->isPhpSupported(), 'forwardedForHeadersWorking' => $this->forwardedForHeadersWorking(), 'reverseProxyDocs' => $this->urlGenerator->linkToDocs('admin-reverse-proxy'), 'isCorrectMemcachedPHPModuleInstalled' => $this->isCorrectMemcachedPHPModuleInstalled(), 'hasPassedCodeIntegrityCheck' => $this->checker->hasPassedCheck(), 'codeIntegrityCheckerDocumentation' => $this->urlGenerator->linkToDocs('admin-code-integrity')]);
}
示例5: check
/**
* @return DataResponse
*/
public function check()
{
return new DataResponse(['serverHasInternetConnection' => $this->isInternetConnectionWorking(), 'dataDirectoryProtected' => $this->util->isHtaccessWorking($this->config), 'isMemcacheConfigured' => $this->isMemcacheConfigured(), 'memcacheDocs' => $this->urlGenerator->linkToDocs('admin-performance'), 'isUrandomAvailable' => $this->isUrandomAvailable(), 'securityDocs' => $this->urlGenerator->linkToDocs('admin-security'), 'isUsedTlsLibOutdated' => $this->isUsedTlsLibOutdated(), 'phpSupported' => $this->isPhpSupported(), 'forwardedForHeadersWorking' => $this->forwardedForHeadersWorking(), 'reverseProxyDocs' => $this->urlGenerator->linkToDocs('admin-reverse-proxy'), 'isCorrectMemcachedPHPModuleInstalled' => $this->isCorrectMemcachedPHPModuleInstalled()]);
}