aboutsummaryrefslogtreecommitdiffstats
path: root/include/classes/BigPipe/Resource.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-10-21 23:54:41 +0200
committerThomas Lange <code@nerdmind.de>2017-10-21 23:54:41 +0200
commitbcf23c3ab443567991d602f6d06d87051aa3468b (patch)
tree4d566c8b8b2c7c7180900b4a60929eed27780cdb /include/classes/BigPipe/Resource.php
parent80420baa5b6c42f016c041bc13264382cc50d698 (diff)
downloadbigpipe-bcf23c3ab443567991d602f6d06d87051aa3468b.tar.gz
bigpipe-bcf23c3ab443567991d602f6d06d87051aa3468b.tar.xz
bigpipe-bcf23c3ab443567991d602f6d06d87051aa3468b.zip
Code optimization: The method "getStructure" has been added to the abstract Item class.
Diffstat (limited to 'include/classes/BigPipe/Resource.php')
-rwxr-xr-xinclude/classes/BigPipe/Resource.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/classes/BigPipe/Resource.php b/include/classes/BigPipe/Resource.php
index 438b83c..4711d48 100755
--- a/include/classes/BigPipe/Resource.php
+++ b/include/classes/BigPipe/Resource.php
@@ -55,5 +55,12 @@ abstract class Resource extends Item {
public function getURL() {
return $this->resourceURL;
}
+
+ #===============================================================================
+ # Return the resource structure
+ #===============================================================================
+ public function getStructure(): array {
+ return ['ID' => $this->getID(), 'HREF' => $this->getURL(), 'PHASE' => $this->getPhaseDoneJS()];
+ }
}
?> \ No newline at end of file