Fix PHPDoc ...
This commit is contained in:
parent
cc72c6a30d
commit
502e454a69
7 changed files with 20 additions and 16 deletions
|
@ -22,7 +22,6 @@
|
|||
namespace OCA\DAV\SystemTag;
|
||||
|
||||
use Sabre\DAV\Exception\NotFound;
|
||||
use Sabre\DAV\Exception\MethodNotAllowed;
|
||||
|
||||
use OCP\SystemTag\ISystemTag;
|
||||
use OCP\SystemTag\ISystemTagManager;
|
||||
|
@ -53,6 +52,10 @@ class SystemTagMappingNode extends SystemTagNode {
|
|||
* Sets up the node, expects a full path name
|
||||
*
|
||||
* @param ISystemTag $tag system tag
|
||||
* @param string $objectId
|
||||
* @param string $objectType
|
||||
* @param ISystemTagManager $tagManager
|
||||
* @param ISystemTagObjectMapper $tagMapper
|
||||
*/
|
||||
public function __construct(
|
||||
ISystemTag $tag,
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
namespace OCA\DAV\SystemTag;
|
||||
|
||||
use OCP\SystemTag\TagAlreadyExistsException;
|
||||
use Sabre\DAV\Exception\NotFound;
|
||||
use Sabre\DAV\Exception\MethodNotAllowed;
|
||||
use Sabre\DAV\Exception\Conflict;
|
||||
|
@ -45,6 +46,7 @@ class SystemTagNode implements \Sabre\DAV\INode {
|
|||
* Sets up the node, expects a full path name
|
||||
*
|
||||
* @param ISystemTag $tag system tag
|
||||
* @param ISystemTagManager $tagManager
|
||||
*/
|
||||
public function __construct(ISystemTag $tag, ISystemTagManager $tagManager) {
|
||||
$this->tag = $tag;
|
||||
|
@ -84,6 +86,7 @@ class SystemTagNode implements \Sabre\DAV\INode {
|
|||
* @param string $name new tag name
|
||||
* @param bool $userVisible user visible
|
||||
* @param bool $userAssignable user assignable
|
||||
* @throws Conflict
|
||||
*/
|
||||
public function update($name, $userVisible, $userAssignable) {
|
||||
try {
|
||||
|
|
|
@ -20,16 +20,18 @@
|
|||
*/
|
||||
namespace OCA\DAV\SystemTag;
|
||||
|
||||
use Sabre\DAV\Exception\NotFound;
|
||||
use Sabre\DAV\PropFind;
|
||||
use Sabre\DAV\PropPatch;
|
||||
use Sabre\DAV\Exception\BadRequest;
|
||||
use Sabre\DAV\Exception\UnsupportedMediaType;
|
||||
use Sabre\DAV\Exception\Conflict;
|
||||
|
||||
use OCA\DAV\SystemTag\SystemTagNode;
|
||||
use OCP\SystemTag\ISystemTag;
|
||||
use OCP\SystemTag\ISystemTagManager;
|
||||
use OCP\SystemTag\TagAlreadyExistsException;
|
||||
use Sabre\HTTP\RequestInterface;
|
||||
use Sabre\HTTP\ResponseInterface;
|
||||
|
||||
class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
|
||||
|
||||
|
@ -72,7 +74,7 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
|
|||
*/
|
||||
public function initialize(\Sabre\DAV\Server $server) {
|
||||
|
||||
$server->xmlNamespaces[self::NS_OWNCLOUD] = 'oc';
|
||||
$server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc';
|
||||
|
||||
$server->protectedProperties[] = self::ID_PROPERTYNAME;
|
||||
|
||||
|
@ -130,11 +132,11 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
|
|||
*
|
||||
* @param string $data
|
||||
* @param string $contentType content type of the data
|
||||
*
|
||||
* @return ISystemTag newly created system tag
|
||||
*
|
||||
* @throws UnsupportedMediaType if the content type is not supported
|
||||
* @throws BadRequest if a field was missing
|
||||
* @throws Conflict
|
||||
* @throws UnsupportedMediaType if the content type is not supported
|
||||
*/
|
||||
private function createTag($data, $contentType = 'application/json') {
|
||||
if ($contentType === 'application/json') {
|
||||
|
@ -212,15 +214,15 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
|
|||
self::USERVISIBLE_PROPERTYNAME,
|
||||
self::USERASSIGNABLE_PROPERTYNAME,
|
||||
], function($props) use ($path) {
|
||||
$node = $this->tree->getNodeForPath($path);
|
||||
$node = $this->server->tree->getNodeForPath($path);
|
||||
if (!($node instanceof SystemTagNode)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$tag = $node->getTag();
|
||||
$tag = $node->getSystemTag();
|
||||
$name = $tag->getName();
|
||||
$userVisible = $tag->getUserVisible();
|
||||
$userAssignable = $tag->getUserAssignable();
|
||||
$userVisible = $tag->isUserVisible();
|
||||
$userAssignable = $tag->isUserAssignable();
|
||||
|
||||
if (isset($props[self::DISPLAYNAME_PROPERTYNAME])) {
|
||||
$name = $props[self::DISPLAYNAME_PROPERTYNAME];
|
||||
|
|
|
@ -29,7 +29,6 @@ use Sabre\DAV\ICollection;
|
|||
use OCP\SystemTag\ISystemTagManager;
|
||||
use OCP\SystemTag\ISystemTag;
|
||||
use OCP\SystemTag\TagNotFoundException;
|
||||
use OC\SystemTag\SystemTag;
|
||||
|
||||
class SystemTagsByIdCollection implements ICollection {
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ namespace OCA\DAV\SystemTag;
|
|||
|
||||
use Sabre\DAV\Exception\Forbidden;
|
||||
use Sabre\DAV\Exception\NotFound;
|
||||
use Sabre\DAV\Exception\MethodNotAllowed;
|
||||
use Sabre\DAV\Exception\BadRequest;
|
||||
use Sabre\DAV\ICollection;
|
||||
|
||||
|
@ -31,7 +30,6 @@ use OCP\SystemTag\ISystemTagManager;
|
|||
use OCP\SystemTag\ISystemTagObjectMapper;
|
||||
use OCP\SystemTag\ISystemTag;
|
||||
use OCP\SystemTag\TagNotFoundException;
|
||||
use OC\SystemTag\SystemTag;
|
||||
|
||||
/**
|
||||
* Collection containing tags by object id
|
||||
|
|
|
@ -22,15 +22,11 @@
|
|||
namespace OCA\DAV\SystemTag;
|
||||
|
||||
use Sabre\DAV\Exception\Forbidden;
|
||||
use Sabre\DAV\Exception\NotFound;
|
||||
use Sabre\DAV\Exception\MethodNotAllowed;
|
||||
use Sabre\DAV\ICollection;
|
||||
|
||||
use OCP\SystemTag\ISystemTagManager;
|
||||
use OCP\SystemTag\ISystemTagObjectMapper;
|
||||
use OCP\SystemTag\ISystemTag;
|
||||
use OCP\SystemTag\TagNotFoundException;
|
||||
use OC\SystemTag\SystemTag;
|
||||
|
||||
/**
|
||||
* Collection containing object ids by object type
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
namespace OCA\DAV\SystemTag;
|
||||
|
||||
use OCP\SystemTag\ISystemTagManager;
|
||||
use OCP\SystemTag\ISystemTagObjectMapper;
|
||||
use Sabre\DAV\Exception\Forbidden;
|
||||
use Sabre\DAV\SimpleCollection;
|
||||
|
||||
class SystemTagsRelationsCollection extends SimpleCollection {
|
||||
|
|
Loading…
Reference in a new issue