summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2018-02-07 21:24:29 -0500
committerMalf Furious <m@lfurio.us>2018-02-07 21:24:29 -0500
commitc283905537ffb770c2b7e85529238cca9aa96869 (patch)
treeb287ac8b498043f1c09528e376e55e079d111344
parent66aa954421c093ad54da8806e42d4ff9bba59091 (diff)
downloadscrott-c283905537ffb770c2b7e85529238cca9aa96869.tar.gz
scrott-c283905537ffb770c2b7e85529238cca9aa96869.zip
Rename object class
Since 'object' is now a reserved word (as of PHP 7.2), I have to rename this class. I really preferred the name object, but obj will have to do.
-rw-r--r--app/class/object.class.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/class/object.class.php b/app/class/object.class.php
index c1ba85c..5be9ac3 100644
--- a/app/class/object.class.php
+++ b/app/class/object.class.php
@@ -19,7 +19,7 @@ require_once "class/image.php";
* This is a generic database object. This is a supertype of all Scrott
* datatypes and defines fields common to all of them.
*/
-class object extends table
+class obj extends table
{
/*
* Constants used for uploading images
@@ -66,7 +66,7 @@ class object extends table
*/
public static function typeOf(string $guid) : string
{
- $obj = new object($guid);
+ $obj = new obj($guid);
return $obj->objtype;
}
@@ -125,19 +125,19 @@ class object extends table
* Get the parent of this object. If this object does not have a
* parent, NULL will be returned.
*/
- public function getParent() : ?object
+ public function getParent() : ?obj
{
if (!isset($this->parent) || $this->parent == "")
return NULL;
- $parent = new object($this->parent);
+ $parent = new obj($this->parent);
return new $parent->objtype($parent->guid);
}
/*
* Update the parent of this object
*/
- public function setParent(object $parent) : void
+ public function setParent(obj $parent) : void
{
$this->parent = $parent->guid;
$this->saveObj();