mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
add method isType(), make functions explicitly public
This commit is contained in:
parent
61a15c877f
commit
4a7d572f95
|
@ -47,6 +47,15 @@ class SeedDMS_Core_Object { /* {{{ */
|
|||
$this->_dms = null;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Check if this object is of a given type.
|
||||
*
|
||||
* This method must be implemened in the child class
|
||||
*
|
||||
* @param string $type type of object
|
||||
*/
|
||||
public function isType($type) {return false;}
|
||||
|
||||
/**
|
||||
* Set dms this object belongs to.
|
||||
*
|
||||
|
@ -57,23 +66,27 @@ class SeedDMS_Core_Object { /* {{{ */
|
|||
*
|
||||
* @param SeedDMS_Core_DMS $dms reference to dms
|
||||
*/
|
||||
function setDMS($dms) { /* {{{ */
|
||||
public function setDMS($dms) { /* {{{ */
|
||||
$this->_dms = $dms;
|
||||
} /* }}} */
|
||||
|
||||
public function getDMS() { /* {{{ */
|
||||
return $this->_dms;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Return the internal id of the document
|
||||
*
|
||||
* @return integer id of document
|
||||
*/
|
||||
function getID() { return $this->_id; }
|
||||
public function getID() { return $this->_id; }
|
||||
|
||||
/**
|
||||
* Returns all attributes set for the object
|
||||
*
|
||||
* @return array|bool
|
||||
*/
|
||||
function getAttributes() { /* {{{ */
|
||||
public function getAttributes() { /* {{{ */
|
||||
if (!$this->_attributes) {
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
|
@ -113,7 +126,7 @@ class SeedDMS_Core_Object { /* {{{ */
|
|||
* @return array|string value of attritbute or false. The value is an array
|
||||
* if the attribute is defined as multi value
|
||||
*/
|
||||
function getAttribute($attrdef) { /* {{{ */
|
||||
public function getAttribute($attrdef) { /* {{{ */
|
||||
if (!$this->_attributes) {
|
||||
$this->getAttributes();
|
||||
}
|
||||
|
@ -133,7 +146,7 @@ class SeedDMS_Core_Object { /* {{{ */
|
|||
* @return array|string value of attritbute or false. The value is an array
|
||||
* if the attribute is defined as multi value
|
||||
*/
|
||||
function getAttributeValue($attrdef) { /* {{{ */
|
||||
public function getAttributeValue($attrdef) { /* {{{ */
|
||||
if (!$this->_attributes) {
|
||||
$this->getAttributes();
|
||||
}
|
||||
|
@ -171,7 +184,7 @@ class SeedDMS_Core_Object { /* {{{ */
|
|||
* @return array|bool
|
||||
* even if the attribute is not defined as multi value
|
||||
*/
|
||||
function getAttributeValueAsArray($attrdef) { /* {{{ */
|
||||
public function getAttributeValueAsArray($attrdef) { /* {{{ */
|
||||
if (!$this->_attributes) {
|
||||
$this->getAttributes();
|
||||
}
|
||||
|
@ -194,7 +207,7 @@ class SeedDMS_Core_Object { /* {{{ */
|
|||
* @return string value of attritbute or false. The value is always a string
|
||||
* even if the attribute is defined as multi value
|
||||
*/
|
||||
function getAttributeValueAsString($attrdef) { /* {{{ */
|
||||
public function getAttributeValueAsString($attrdef) { /* {{{ */
|
||||
if (!$this->_attributes) {
|
||||
$this->getAttributes();
|
||||
}
|
||||
|
@ -214,7 +227,7 @@ class SeedDMS_Core_Object { /* {{{ */
|
|||
* must be an array
|
||||
* @return boolean true if operation was successful, otherwise false
|
||||
*/
|
||||
function setAttributeValue($attrdef, $value) { /* {{{ */
|
||||
public function setAttributeValue($attrdef, $value) { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
if (!$this->_attributes) {
|
||||
$this->getAttributes();
|
||||
|
@ -265,7 +278,7 @@ class SeedDMS_Core_Object { /* {{{ */
|
|||
* @param SeedDMS_Core_AttributeDefinition $attrdef
|
||||
* @return boolean true if operation was successful, otherwise false
|
||||
*/
|
||||
function removeAttribute($attrdef) { /* {{{ */
|
||||
public function removeAttribute($attrdef) { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
if (!$this->_attributes) {
|
||||
$this->getAttributes();
|
||||
|
|
Loading…
Reference in New Issue
Block a user