mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-18 07:52:21 +01:00
Add missing public declarations
This commit is contained in:
parent
15cabea73a
commit
b71b0c280b
@ -38,7 +38,7 @@ abstract class AbstractPIMCollection extends AbstractPIMObject implements \Itera
|
||||
* This is a collection so return null.
|
||||
* @return null
|
||||
*/
|
||||
function getParent() {
|
||||
public function getParent() {
|
||||
null;
|
||||
}
|
||||
|
||||
@ -49,14 +49,14 @@ abstract class AbstractPIMCollection extends AbstractPIMObject implements \Itera
|
||||
* @param string $id
|
||||
* @return IPIMObject
|
||||
*/
|
||||
abstract function getChild($id);
|
||||
public abstract function getChild($id);
|
||||
|
||||
/**
|
||||
* Returns an array with all the child nodes
|
||||
*
|
||||
* @return IPIMObject[]
|
||||
*/
|
||||
abstract function getChildren($limit = null, $offset = null);
|
||||
public abstract function getChildren($limit = null, $offset = null);
|
||||
|
||||
/**
|
||||
* Checks if a child-node with the specified id exists
|
||||
@ -64,7 +64,7 @@ abstract class AbstractPIMCollection extends AbstractPIMObject implements \Itera
|
||||
* @param string $id
|
||||
* @return bool
|
||||
*/
|
||||
abstract function childExists($id);
|
||||
public abstract function childExists($id);
|
||||
|
||||
/**
|
||||
* Add a child to the collection
|
||||
@ -74,7 +74,7 @@ abstract class AbstractPIMCollection extends AbstractPIMObject implements \Itera
|
||||
* @param mixed $data
|
||||
* @return string ID of the newly added child
|
||||
*/
|
||||
abstract public function addChild($data);
|
||||
public abstract function addChild($data);
|
||||
|
||||
/**
|
||||
* Delete a child from the collection
|
||||
@ -82,7 +82,7 @@ abstract class AbstractPIMCollection extends AbstractPIMObject implements \Itera
|
||||
* @param string $id
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function deleteChild($id);
|
||||
public abstract public function deleteChild($id);
|
||||
|
||||
// Iterator methods
|
||||
|
||||
|
@ -84,7 +84,7 @@ abstract class AbstractPIMObject implements IPIMObject {
|
||||
* to the parent object, otherwise return null.
|
||||
* @return IPIMObject|null
|
||||
*/
|
||||
function getParent() {
|
||||
public function getParent() {
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
@ -100,14 +100,14 @@ abstract class AbstractPIMObject implements IPIMObject {
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
function getPermissions() {
|
||||
public function getPermissions() {
|
||||
return $this->permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return AbstractBackend
|
||||
*/
|
||||
function getBackend() {
|
||||
public function getBackend() {
|
||||
return $this->backend;
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ abstract class AbstractPIMObject implements IPIMObject {
|
||||
* @param integer $permission
|
||||
* @return boolean
|
||||
*/
|
||||
function hasPermission($permission) {
|
||||
public function hasPermission($permission) {
|
||||
return $this->getPermissions() & $permission;
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ class Addressbook extends AbstractPIMCollection {
|
||||
* @param string $id
|
||||
* @return Contact|null
|
||||
*/
|
||||
function getChild($id) {
|
||||
public function getChild($id) {
|
||||
//\OCP\Util::writeLog('contacts', __METHOD__.' id: '.$id, \OCP\Util::DEBUG);
|
||||
if(!$this->hasPermission(\OCP\PERMISSION_READ)) {
|
||||
throw new \Exception(self::$l10n->t('You do not have permissions to see this contacts'), 403);
|
||||
@ -153,7 +153,7 @@ class Addressbook extends AbstractPIMCollection {
|
||||
* @param string $id
|
||||
* @return bool
|
||||
*/
|
||||
function childExists($id) {
|
||||
public function childExists($id) {
|
||||
return ($this->getChild($id) !== null);
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ class Addressbook extends AbstractPIMCollection {
|
||||
*
|
||||
* @return Contact[]
|
||||
*/
|
||||
function getChildren($limit = null, $offset = null, $omitdata = false) {
|
||||
public function getChildren($limit = null, $offset = null, $omitdata = false) {
|
||||
if(!$this->hasPermission(\OCP\PERMISSION_READ)) {
|
||||
throw new \Exception(self::$l10n->t('You do not have permissions to see these contacts'), 403);
|
||||
}
|
||||
|
@ -184,11 +184,11 @@ class Contact extends VObject\VCard implements IPIMObject {
|
||||
* to the parent object, otherwise return null.
|
||||
* @return IPIMObject|null
|
||||
*/
|
||||
function getParent() {
|
||||
public function getParent() {
|
||||
return $this->props['parent'];
|
||||
}
|
||||
|
||||
function getBackend() {
|
||||
public function getBackend() {
|
||||
return $this->props['backend'];
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ class Contact extends VObject\VCard implements IPIMObject {
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
function getPermissions() {
|
||||
public function getPermissions() {
|
||||
return $this->props['parent']->getPermissions();
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ class Contact extends VObject\VCard implements IPIMObject {
|
||||
* @param integer $permission
|
||||
* @return bool
|
||||
*/
|
||||
function hasPermission($permission) {
|
||||
public function hasPermission($permission) {
|
||||
return $this->getPermissions() & $permission;
|
||||
}
|
||||
|
||||
|
@ -69,20 +69,20 @@ interface IPIMObject {
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
function getDisplayName();
|
||||
public function getDisplayName();
|
||||
|
||||
/**
|
||||
* Get the owner of the object.
|
||||
* @return string|null
|
||||
*/
|
||||
function getOwner();
|
||||
public function getOwner();
|
||||
|
||||
/**
|
||||
* If this object is part of a collection return a reference
|
||||
* to the parent object, otherwise return null.
|
||||
* @return IPIMObject|null
|
||||
*/
|
||||
function getParent();
|
||||
public function getParent();
|
||||
|
||||
|
||||
/** CRUDS permissions (Create, Read, Update, Delete, Share) using a bitmask of
|
||||
@ -97,18 +97,18 @@ interface IPIMObject {
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
function getPermissions();
|
||||
public function getPermissions();
|
||||
|
||||
/**
|
||||
* @return AbstractBackend
|
||||
*/
|
||||
function getBackend();
|
||||
public function getBackend();
|
||||
|
||||
/**
|
||||
* @param integer $permission
|
||||
* @return boolean
|
||||
*/
|
||||
function hasPermission($permission);
|
||||
public function hasPermission($permission);
|
||||
|
||||
/**
|
||||
* @brief Get the last modification time for the object.
|
||||
|
Loading…
x
Reference in New Issue
Block a user