Skip to content
Permalink
Browse files

ID#323: enhanced GORM domain object API to support fluent interfaces.

  • Loading branch information...
Christian Achatz
Christian Achatz committed May 18, 2018
1 parent 8a3db01 commit 0b122a510e1b935e50856865bf5b26be7b1d4a5b
@@ -94,6 +94,8 @@ public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
return $this;
}
public function getProperties() {
@@ -112,12 +114,16 @@ public function setProperties(array $properties = []) {
$this->$key = $value;
}
}
return $this;
}
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
return $this;
}
public function setObjectId(int $id) {
@@ -26,7 +26,6 @@
* CHANGES WILL BE OVERWRITTEN WHEN UPDATING!!
* You can change class "Message" which extends this base-class.
*/
use APF\extensions\postbox\biz\AbstractMessage;
/**
* This class provides the descriptive getter and setter methods for the "APF\extensions\postbox\biz\Message" domain object.
@@ -82,6 +81,8 @@ public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
return $this;
}
public function getProperties() {
@@ -100,12 +101,16 @@ public function setProperties(array $properties = []) {
$this->$key = $value;
}
}
return $this;
}
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
return $this;
}
public function setObjectId(int $id) {
@@ -26,7 +26,6 @@
* CHANGES WILL BE OVERWRITTEN WHEN UPDATING!!
* You can change class "MessageChannel" which extends this base-class.
*/
use APF\extensions\postbox\biz\AbstractMessageChannel;
/**
* This class provides the descriptive getter and setter methods for the "APF\extensions\postbox\biz\MessageChannel" domain object.
@@ -76,6 +75,8 @@ public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
return $this;
}
public function getProperties() {
@@ -94,12 +95,16 @@ public function setProperties(array $properties = []) {
$this->$key = $value;
}
}
return $this;
}
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
return $this;
}
public function setObjectId(int $id) {
@@ -26,7 +26,6 @@
* CHANGES WILL BE OVERWRITTEN WHEN UPDATING!!
* You can change class "PostboxFolder" which extends this base-class.
*/
use APF\extensions\postbox\biz\AbstractPostboxFolder;
/**
* This class provides the descriptive getter and setter methods for the "APF\extensions\postbox\biz\PostboxFolder" domain object.
@@ -76,6 +75,8 @@ public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
return $this;
}
public function getProperties() {
@@ -94,12 +95,16 @@ public function setProperties(array $properties = []) {
$this->$key = $value;
}
}
return $this;
}
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
return $this;
}
public function setObjectId(int $id) {
@@ -26,7 +26,6 @@
* CHANGES WILL BE OVERWRITTEN WHEN UPDATING!!
* You can change class "RecipientList" which extends this base-class.
*/
use APF\extensions\postbox\biz\AbstractRecipientList;
/**
* This class provides the descriptive getter and setter methods for the "APF\extensions\postbox\biz\RecipientList" domain object.
@@ -76,6 +75,8 @@ public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
return $this;
}
public function getProperties() {
@@ -94,12 +95,16 @@ public function setProperties(array $properties = []) {
$this->$key = $value;
}
}
return $this;
}
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
return $this;
}
public function setObjectId(int $id) {
@@ -146,12 +146,16 @@ public function setObjectId(int $id) {
* @param string $name name of the specified domain object property
* @param string $value value of the specified domain object property
*
* @return $this This instance for further usage.
*
* @author Christian Achatz
* @version
* Version 0.1, 26.04.2008<br />
*/
public function setProperty(string $name, $value) {
$this->properties[$name] = $value;
return $this;
}
/**
@@ -430,6 +434,8 @@ public function getProperties() {
*
* @param string[] $properties list of defined properties to apply to the domain object
*
* @return $this This instance for further usage.
*
* @author Christian Achatz
* @version
* Version 0.1, 26.04.2008<br />
@@ -438,6 +444,8 @@ public function setProperties(array $properties = []) {
if (count($properties) > 0) {
$this->properties = $properties;
}
return $this;
}
/**
@@ -574,12 +582,16 @@ public function extractRelationTimestamps($prefix) {
*
* @param string $name The name of the property to delete.
*
* @return $this This instance for further usage.
*
* @author Christian Achatz
* @version
* Version 0.1, 20.09.2009 (Introduces because of bug 202)<br />
*/
public function deleteProperty(string $name) {
unset($this->properties[$name]);
return $this;
}
/**
@@ -257,6 +257,8 @@ protected function generateBaseObjectCode($name) {
' if (in_array($name, $this->propertyNames)) {' . self::EOL .
' $this->$name = $value;' . self::EOL .
' }' . self::EOL .
self::EOL .
' return $this;' . self::EOL .
' }' . self::EOL . self::EOL .
' public function getProperties() {' . self::EOL .
@@ -275,12 +277,16 @@ protected function generateBaseObjectCode($name) {
' $this->$key = $value;' . self::EOL .
' }' . self::EOL .
' }' . self::EOL .
self::EOL .
' return $this;' . self::EOL .
' }' . self::EOL . self::EOL .
' public function deleteProperty(string $name) {' . self::EOL .
' if (in_array($name, $this->propertyNames)) {' . self::EOL .
' $this->$name = null;' . self::EOL .
' }' . self::EOL .
self::EOL .
' return $this;' . self::EOL .
' }' . self::EOL . self::EOL .
' public function setObjectId(int $id) {' . self::EOL .
@@ -76,6 +76,8 @@ public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
return $this;
}
public function getProperties() {
@@ -94,12 +96,16 @@ public function setProperties(array $properties = []) {
$this->$key = $value;
}
}
return $this;
}
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
return $this;
}
public function setObjectId(int $id) {
@@ -76,6 +76,8 @@ public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
return $this;
}
public function getProperties() {
@@ -94,12 +96,16 @@ public function setProperties(array $properties = []) {
$this->$key = $value;
}
}
return $this;
}
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
return $this;
}
public function setObjectId(int $id) {
@@ -82,6 +82,8 @@ public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
return $this;
}
public function getProperties() {
@@ -100,12 +102,16 @@ public function setProperties(array $properties = []) {
$this->$key = $value;
}
}
return $this;
}
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
return $this;
}
public function setObjectId(int $id) {
@@ -88,6 +88,8 @@ public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
return $this;
}
public function getProperties() {
@@ -106,12 +108,16 @@ public function setProperties(array $properties = []) {
$this->$key = $value;
}
}
return $this;
}
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
return $this;
}
public function setObjectId(int $id) {
@@ -82,6 +82,8 @@ public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
return $this;
}
public function getProperties() {
@@ -100,12 +102,16 @@ public function setProperties(array $properties = []) {
$this->$key = $value;
}
}
return $this;
}
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
return $this;
}
public function setObjectId(int $id) {
@@ -160,6 +160,8 @@ public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
return $this;
}
public function getProperties() {
@@ -178,12 +180,16 @@ public function setProperties(array $properties = []) {
$this->$key = $value;
}
}
return $this;
}
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
return $this;
}
public function setObjectId(int $id) {
Oops, something went wrong.

0 comments on commit 0b122a5

Please sign in to comment.
You can’t perform that action at this time.