19 declare(strict_types=1);
37 ilFileNamespaceFactoryInterface $namespace
39 $this->
namespace = $namespace;
40 $this->namespaces = $namespace->collection();
46 $clone->namespaces = $clone->namespaces->withElement($namespace_handler);
58 $clone->xml_file_info = $file_info;
64 return $this->xml_file_info->getFilename();
70 ? $this->xml_file_info->getRealPath()
71 : $this->xml_file_info->getPath() . DIRECTORY_SEPARATOR . $this->xml_file_info->getFilename();
78 for ($i = count(
$parts) - 1; $i >= 0; $i--) {
79 $trimmed_str = $i < count(
$parts) - 1
80 ?
$parts[$i] . DIRECTORY_SEPARATOR . $trimmed_str
82 if (
$parts[$i] === $dir_name) {
87 $clone->xml_file_info =
new SplFileInfo($trimmed_str);
95 for ($i = 0; $i < count(
$parts); $i++) {
96 $trimmed_str .= $i > 0
97 ? DIRECTORY_SEPARATOR .
$parts[$i]
99 if (
$parts[$i] === $dir_name) {
103 $clone = clone $this;
104 $clone->xml_file_info =
new SplFileInfo($trimmed_str);
110 return $this->xml_file_info->getPath();
115 return $this->xml_file_info->getRealPath() !==
false;
120 $path_parts = explode(DIRECTORY_SEPARATOR, $this->
getFilePath());
121 foreach ($path_parts as $path_part) {
122 if (preg_match($pattern, $path_part) === 1) {
131 $path_parts = explode(DIRECTORY_SEPARATOR, $this->
getFilePath());
132 if (in_array($folder_name, $path_parts,
true)) {
pathContainsFolderName(string $folder_name)
withFileInfo(SplFileInfo $file_info)
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
getSubPathToDirBeginningAtPathEnd(string $dir_name)
ilFileNamespaceFactoryInterface $namespace
getSubPathToDirBeginningAtPathStart(string $dir_name)
__construct(ilFileNamespaceFactoryInterface $namespace)
ilFileNamespaceCollectionInterface $namespaces
getPathPart(string $pattern)
withAdditionalNamespace(ilFileNamespaceHandlerInterface $namespace_handler)
SplFileInfo $xml_file_info