add issue information

This commit is contained in:
Dennis Eichhorn 2020-05-22 17:32:48 +02:00
parent 61dada268a
commit f4b061ee8a
5 changed files with 142 additions and 36 deletions

View File

@ -280,8 +280,11 @@ class DataMapperAbstract implements DataMapperInterface
*/ */
public static function with(...$objects) : void public static function with(...$objects) : void
{ {
// todo: how to handle with of parent objects/extends/relations /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:optimization] [d:expert]
* Implement with()
* Only load fields or models which are specified in with
*/
self::$fields = $objects; self::$fields = $objects;
} }
@ -1272,8 +1275,6 @@ class DataMapperAbstract implements DataMapperInterface
/** @var self $mapper */ /** @var self $mapper */
$mapper = static::$ownsOne[$propertyName]['mapper']; $mapper = static::$ownsOne[$propertyName]['mapper'];
// todo: delete owned one object is not recommended since it can be owned by by something else? or does owns one mean that nothing else can have a relation to this one?
return $mapper::updateArray($obj, $relations, $depth); return $mapper::updateArray($obj, $relations, $depth);
} }
@ -1644,7 +1645,12 @@ class DataMapperAbstract implements DataMapperInterface
/** @var self $mapper */ /** @var self $mapper */
$mapper = static::$ownsOne[$propertyName]['mapper']; $mapper = static::$ownsOne[$propertyName]['mapper'];
// todo: delete owned one object is not recommended since it can be owned by by something else? or does owns one mean that nothing else can have a relation to this one? /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:question] [d:expert]
* Deleting a owned one object is not recommended since it can be owned by something else?
* Or does owns one mean that nothing else can have a relation to this model?
*/
return $mapper::delete($obj); return $mapper::delete($obj);
} }
@ -2415,6 +2421,10 @@ class DataMapperAbstract implements DataMapperInterface
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*
* @todo Orange-Management/phpOMS#? [p:medium] [d:medium] [t:bug]
* If the pivot element doesn't exist the result set is empty.
* It should just return the closes elements "before" the pivot element.
*/ */
public static function getBeforePivot( public static function getBeforePivot(
$pivot, $pivot,

View File

@ -850,7 +850,11 @@ class Builder extends BuilderAbstract
*/ */
public function count(string $table = '*') : self public function count(string $table = '*') : self
{ {
// todo: don't do this as string, create new object new \count(); this can get handled by the grammar parser WAY better /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:optimization] [d:medium]
* Don't do this as a string, create a new object $this->select(new Count($table)).
* The parser should be able to handle this much better
*/
return $this->select('COUNT(' . $table . ')'); return $this->select('COUNT(' . $table . ')');
} }

View File

@ -33,6 +33,14 @@ use phpOMS\Uri\HttpUri;
*/ */
class Directory extends FileAbstract implements FtpContainerInterface, DirectoryInterface class Directory extends FileAbstract implements FtpContainerInterface, DirectoryInterface
{ {
/**
* Ftp connection
*
* @var resource
* @since 1.0.0
*/
private $con;
/** /**
* Directory nodes (files and directories). * Directory nodes (files and directories).
* *
@ -528,9 +536,12 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory
*/ */
public function createNode() : bool public function createNode() : bool
{ {
return self::create($this->path, $this->permission, true); return self::create($this->con, $this->path, $this->permission, true);
// todo: add node /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Add node to node list
*/
} }
/** /**
@ -550,7 +561,12 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory
*/ */
public function getParent() : ContainerInterface public function getParent() : ContainerInterface
{ {
// todo: Implement getParent() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement getParent()
*/
return $this;
} }
/** /**
@ -558,7 +574,12 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory
*/ */
public function copyNode(string $to, bool $overwrite = false) : bool public function copyNode(string $to, bool $overwrite = false) : bool
{ {
// todo: Implement copyNode() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement copyNode()
*/
return true;
} }
/** /**
@ -566,7 +587,12 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory
*/ */
public function moveNode(string $to, bool $overwrite = false) : bool public function moveNode(string $to, bool $overwrite = false) : bool
{ {
// todo: Implement moveNode() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement moveNode()
*/
return true;
} }
/** /**
@ -574,7 +600,12 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory
*/ */
public function deleteNode() : bool public function deleteNode() : bool
{ {
// todo: Implement deleteNode() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement deleteNode()
*/
return true;
} }
/** /**
@ -650,16 +681,13 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory
} }
/** /**
* Offset to retrieve * {@inheritdoc}
* @link http://php.net/manual/en/arrayaccess.offsetget.php
* @param mixed $offset <p>
* The offset to retrieve.
* </p>
* @return mixed can return all value types
* @since 5.0.0
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
// todo: Implement offsetGet() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement offsetGet()
*/
} }
} }

View File

@ -407,7 +407,12 @@ class File extends FileAbstract implements FileInterface
*/ */
public function getParent() : ContainerInterface public function getParent() : ContainerInterface
{ {
// todo adjust http link and self(); /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement getParent()
*/
return $this;
} }
/** /**
@ -419,7 +424,7 @@ class File extends FileAbstract implements FileInterface
*/ */
public function createNode() : bool public function createNode() : bool
{ {
return self::ftpCreate($this->con, $this->uri->getPath(), 0755, true); return self::create($this->con, $this->uri->getPath(), 0755, true);
} }
/** /**
@ -434,7 +439,12 @@ class File extends FileAbstract implements FileInterface
*/ */
public function copyNode(string $to, bool $overwrite = false) : bool public function copyNode(string $to, bool $overwrite = false) : bool
{ {
// todo: Implement copyNode() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement copyNode()
*/
return true;
} }
/** /**
@ -449,7 +459,12 @@ class File extends FileAbstract implements FileInterface
*/ */
public function moveNode(string $to, bool $overwrite = false) : bool public function moveNode(string $to, bool $overwrite = false) : bool
{ {
// todo: Implement moveNode() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement moveNode()
*/
return true;
} }
/** /**
@ -461,7 +476,12 @@ class File extends FileAbstract implements FileInterface
*/ */
public function deleteNode() : bool public function deleteNode() : bool
{ {
// todo: Implement deleteNode() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement deleteNode()
*/
return true;
} }
/** /**
@ -476,7 +496,12 @@ class File extends FileAbstract implements FileInterface
*/ */
public function putContent(string $content, int $mode = ContentPutMode::APPEND | ContentPutMode::CREATE) : bool public function putContent(string $content, int $mode = ContentPutMode::APPEND | ContentPutMode::CREATE) : bool
{ {
// todo: Implement putContent() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement putContent()
*/
return true;
} }
/** /**
@ -492,7 +517,12 @@ class File extends FileAbstract implements FileInterface
*/ */
public function setContent(string $content) : bool public function setContent(string $content) : bool
{ {
// todo: Implement setContent() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement setContent()
*/
return true;
} }
/** /**
@ -508,7 +538,12 @@ class File extends FileAbstract implements FileInterface
*/ */
public function appendContent(string $content) : bool public function appendContent(string $content) : bool
{ {
// todo: Implement appendContent() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement appendContent()
*/
return true;
} }
/** /**
@ -524,7 +559,12 @@ class File extends FileAbstract implements FileInterface
*/ */
public function prependContent(string $content) : bool public function prependContent(string $content) : bool
{ {
// todo: Implement prependContent() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement prependContent()
*/
return true;
} }
/** /**
@ -536,7 +576,12 @@ class File extends FileAbstract implements FileInterface
*/ */
public function getContent() : string public function getContent() : string
{ {
// todo: Implement getContent() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement getContent()
*/
return '';
} }
/** /**
@ -548,6 +593,11 @@ class File extends FileAbstract implements FileInterface
*/ */
public function getExtension() : string public function getExtension() : string
{ {
// todo: Implement getExtension() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement getExtension()
*/
return '';
} }
} }

View File

@ -282,7 +282,9 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D
/** /**
* {@inheritdoc} * {@inheritdoc}
* todo: move to fileAbastract since it should be the same for file and directory? *
* @todo Orange-Management/phpOMS#??? [p:low] [t:optimization] [d:beginner] [t:question]
* Consider to move this to fileAbastract since it should be the same for file and directory?
*/ */
public static function created(string $path) : \DateTime public static function created(string $path) : \DateTime
{ {
@ -425,7 +427,10 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D
{ {
return self::create($this->path, $this->permission, true); return self::create($this->path, $this->permission, true);
// todo: add node /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Add node to current node list
*/
} }
/** /**
@ -469,7 +474,10 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D
unset($this->nodes[$name]); unset($this->nodes[$name]);
// todo: unlink??? /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:question] [d:medium]
* Should this also remove the resource? \unlink();
*/
return true; return true;
} }
@ -612,7 +620,10 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D
{ {
return self::delete($this->path); return self::delete($this->path);
// todo: remove from node list /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Remove node from node list
*/
} }
/** /**
@ -620,6 +631,9 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D
*/ */
public function offsetGet($offset) : void public function offsetGet($offset) : void
{ {
// todo: Implement offsetGet() method. /**
* @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium]
* Implement offsetGet()
*/
} }
} }