for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace kalanis\kw_files\Processing\Storage;
use DateTimeInterface;
use kalanis\kw_files\Interfaces\IFLTranslations;
use kalanis\kw_files\Interfaces\IProcessNodes;
use kalanis\kw_storage\Interfaces\IStorage;
/**
* Class ProcessNode
* @package kalanis\kw_files\Processing\Storage
* Process nodes in storages
*/
class ProcessNode implements IProcessNodes
{
protected IProcessNodes $adapter;
public function __construct(IStorage $storage, ?IFLTranslations $lang = null)
$factory = new Nodes\Factory();
$this->adapter = $factory->getClass($storage, $lang);
}
public function exists(array $entry): bool
return $this->adapter->exists($entry);
public function isReadable(array $entry): bool
return $this->adapter->isReadable($entry);
public function isWritable(array $entry): bool
return $this->adapter->isWritable($entry);
public function isDir(array $entry): bool
return $this->adapter->isDir($entry);
public function isFile(array $entry): bool
return $this->adapter->isFile($entry);
public function size(array $entry): ?int
return $this->adapter->size($entry);
public function created(array $entry): ?DateTimeInterface
return $this->adapter->created($entry);