Deleted_notice.php

Summary
Deleted_notice.php
Deleted_noticeClass which holds information for a deleted notice
Deleted_noticeTable Definition for deleted_notice
schemaDefReturns the schema definition for the table, for upgrade/checkschema integrity checks
addNewAdd a new deleted notice to the database
fromStoredReturn a deletion entry that was stored
getActorReturn the user ID of the user whom deleted the notice in question.
getActorObjectReturn the ActivityObject of the user whom deleted the notice in question.
getObjectTypeTell the caller we’re an ActivityObject
getStoredReturn the stored deletion notice
getUriReturns the URI of the deletion notice
asActivityObjectReturns the deletion notice as an ActivityObject, much like the name implies.
extendActivityThe original notice id and type is still stored in the Notice table, so we use that information to describe the delete activity
beforeSchemaUpdateA variety of cleaning tasks to do before database integrity checks.
insert

Deleted_notice

Class which holds information for a deleted notice

postActiv

the micro-blogging software

Copyright

Copyright © 2016, Maiyannah Bishop

Derived from code copyright various sources

  • GNU Social © 2013-2016, Free Software Foundation, Inc
  • StatusNet © 2008-2012, StatusNet, Inc

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses/.

https://www.gnu.org/licenses/agpl.html

About

Class which holds information for a deleted notice

PHP version

Tested with PHP 5.6

File Authors

Web

Deleted_notice

Table Definition for deleted_notice

Variables

  • $__table - ‘deleted_notice’
  • $id - int(4) primary_key not_null
  • $profile_id - int(4) not_null
  • $uri - varchar(191) unique_key not 255 because utf8mb4 takes more space
  • $act_created - datetime() not_null
  • $created - datetime() not_null
Summary
schemaDefReturns the schema definition for the table, for upgrade/checkschema integrity checks
addNewAdd a new deleted notice to the database
fromStoredReturn a deletion entry that was stored
getActorReturn the user ID of the user whom deleted the notice in question.
getActorObjectReturn the ActivityObject of the user whom deleted the notice in question.
getObjectTypeTell the caller we’re an ActivityObject
getStoredReturn the stored deletion notice
getUriReturns the URI of the deletion notice
asActivityObjectReturns the deletion notice as an ActivityObject, much like the name implies.
extendActivityThe original notice id and type is still stored in the Notice table, so we use that information to describe the delete activity
beforeSchemaUpdateA variety of cleaning tasks to do before database integrity checks.
insert

schemaDef

public static function schemaDef()

Returns the schema definition for the table, for upgrade/checkschema integrity checks

addNew

public static function addNew(Notice $notice,  
Profile $actor = null)

Add a new deleted notice to the database

Parameters

  • Notice $notice
  • Profile $actor (default NULL)

fromStored

static public function fromStored(Notice $stored)

Return a deletion entry that was stored

Parameters

  • Notice $stored

getActor

public function getActor()

Return the user ID of the user whom deleted the notice in question.

getActorObject

public function getActorObject()

Return the ActivityObject of the user whom deleted the notice in question.

getObjectType

static public function getObjectType()

Tell the caller we’re an ActivityObject

getStored

public function getStored()

Return the stored deletion notice

getUri

public function getUri()

Returns the URI of the deletion notice

asActivityObject

public function asActivityObject(Profile $scoped = null)

Returns the deletion notice as an ActivityObject, much like the name implies.

Parameters

  • Profile $scoped (default NULL)

Returns

  • ActivityObject $actobj

extendActivity

static public function extendActivity(Notice $stored,  
Activity $act,  
Profile $scoped = null)

The original notice id and type is still stored in the Notice table, so we use that information to describe the delete activity

Parameters

  • Notice $stored
  • Activity $act
  • Profile $scoped (default NULL)

beforeSchemaUpdate

static public function beforeSchemaUpdate()

A variety of cleaning tasks to do before database integrity checks.

insert

function insert()
public static function schemaDef()
Returns the schema definition for the table, for upgrade/checkschema integrity checks
public static function addNew(Notice $notice,  
Profile $actor = null)
Add a new deleted notice to the database
static public function fromStored(Notice $stored)
Return a deletion entry that was stored
public function getActor()
Return the user ID of the user whom deleted the notice in question.
public function getActorObject()
Return the ActivityObject of the user whom deleted the notice in question.
static public function getObjectType()
Tell the caller we’re an ActivityObject
public function getStored()
Return the stored deletion notice
public function getUri()
Returns the URI of the deletion notice
public function asActivityObject(Profile $scoped = null)
Returns the deletion notice as an ActivityObject, much like the name implies.
static public function extendActivity(Notice $stored,  
Activity $act,  
Profile $scoped = null)
The original notice id and type is still stored in the Notice table, so we use that information to describe the delete activity
static public function beforeSchemaUpdate()
A variety of cleaning tasks to do before database integrity checks.
function insert()