mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Naming fix
This commit is contained in:
parent
808e3e4288
commit
a9bb3ae75c
|
|
@ -68,5 +68,5 @@ interface DirectoryInterface extends ContainerInterface, \Iterator, \ArrayAccess
|
|||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function add($file) : bool;
|
||||
public function addNode($file) : bool;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class Directory extends FileAbstract implements DirectoryInterface
|
|||
if (!StringUtils::endsWith(trim($filename), '.')) {
|
||||
$file = is_dir($filename) ? new self($filename) : new File($filename);
|
||||
|
||||
$this->add($file);
|
||||
$this->addNode($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ class Directory extends FileAbstract implements DirectoryInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function add($file) : bool
|
||||
public function addNode($file) : bool
|
||||
{
|
||||
$this->count += $file->getCount();
|
||||
$this->size += $file->getSize();
|
||||
|
|
@ -260,6 +260,8 @@ class Directory extends FileAbstract implements DirectoryInterface
|
|||
public function createNode() : bool
|
||||
{
|
||||
return self::create($this->path, $this->permission, true);
|
||||
|
||||
// todo: add node
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -343,7 +345,7 @@ class Directory extends FileAbstract implements DirectoryInterface
|
|||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->add($value);
|
||||
$this->addNode($value);
|
||||
} else {
|
||||
$this->nodes[$offset] = $value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class File extends FileAbstract implements FileInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function put(string $path, string $content, int $mode = ContentPutMode::APPEND | ContentPutMode::CREATE) : bool
|
||||
public static function put(string $path, string $content, int $mode = ContentPutMode::REPLACE | ContentPutMode::CREATE) : bool
|
||||
{
|
||||
// todo: create all else cases, right now all getting handled the same way which is wrong
|
||||
if (
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user