mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 06:48:41 +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
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @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), '.')) {
|
if (!StringUtils::endsWith(trim($filename), '.')) {
|
||||||
$file = is_dir($filename) ? new self($filename) : new File($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}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function add($file) : bool
|
public function addNode($file) : bool
|
||||||
{
|
{
|
||||||
$this->count += $file->getCount();
|
$this->count += $file->getCount();
|
||||||
$this->size += $file->getSize();
|
$this->size += $file->getSize();
|
||||||
|
|
@ -260,6 +260,8 @@ class Directory extends FileAbstract implements DirectoryInterface
|
||||||
public function createNode() : bool
|
public function createNode() : bool
|
||||||
{
|
{
|
||||||
return self::create($this->path, $this->permission, true);
|
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)
|
public function offsetSet($offset, $value)
|
||||||
{
|
{
|
||||||
if (is_null($offset)) {
|
if (is_null($offset)) {
|
||||||
$this->add($value);
|
$this->addNode($value);
|
||||||
} else {
|
} else {
|
||||||
$this->nodes[$offset] = $value;
|
$this->nodes[$offset] = $value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ class File extends FileAbstract implements FileInterface
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@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
|
// todo: create all else cases, right now all getting handled the same way which is wrong
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user