fixedTime = $time; parent::__construct( $time ); } public function addField( Field $field, DateTime $time = null ) { parent::addField( $field, $time ); $this->lastUpdated = $this->fixedTime; } public function removeField( Field $field, DateTime $time = null ) { parent::removeField( $field, $time ); $this->lastUpdated = $this->fixedTime; } public function setLastUpdated( $lastUpdated ) { // do not change lastUpdated } public static function fromArray( array $arr, DateTime $time = null ) { if ( ! $time ) { $time = self::getDefaultTime(); } $object = new TestActivityPubObject( $time ); foreach ( $arr as $name => $value ) { if ( is_array( $value ) ) { $child = self::fromArray( $value, $time ); TestField::withObject( $object, $name, $child, $time ); } else { TestField::withValue( $object, $name, $value, $time ); } } return $object; } } ?>