summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-12-15 18:27:03 -0500
committerBrion Vibber <brion@pobox.com>2009-12-16 09:27:48 -0500
commit0ca80f78fbb07ebaaa1509c65021eb5f26cf5c99 (patch)
treebd7511bb95be5f64845354a145edb67fa39445b5 /classes/Notice.php
parenta998bda4a57014d0a319fd0bc31552705f0887ed (diff)
Add doc comments listing the array parameters for User::register() and Notice::saveNew()
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 2205279e8..7651d8bd5 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -175,6 +175,35 @@ class Notice extends Memcached_DataObject
}
}
+ /**
+ * Save a new notice and push it out to subscribers' inboxes.
+ * Poster's permissions are checked before sending.
+ *
+ * @param int $profile_id Profile ID of the poster
+ * @param string $content source message text; links may be shortened
+ * per current user's preference
+ * @param string $source source key ('web', 'api', etc)
+ * @param array $options Associative array of optional properties:
+ * string 'created' timestamp of notice; defaults to now
+ * int 'is_local' source/gateway ID, one of:
+ * Notice::LOCAL_PUBLIC - Local, ok to appear in public timeline
+ * Notice::REMOTE_OMB - Sent from a remote OMB service;
+ * hide from public timeline but show in
+ * local "and friends" timelines
+ * Notice::LOCAL_NONPUBLIC - Local, but hide from public timeline
+ * Notice::GATEWAY - From another non-OMB service;
+ * will not appear in public views
+ * float 'lat' decimal latitude for geolocation
+ * float 'lon' decimal longitude for geolocation
+ * int 'location_id' geoname identifier
+ * int 'location_ns' geoname namespace to interpret location_id
+ * int 'reply_to'; notice ID this is a reply to
+ * int 'repeat_of'; notice ID this is a repeat of
+ * string 'uri' permalink to notice; defaults to local notice URL
+ *
+ * @return Notice
+ * @throws ClientException
+ */
static function saveNew($profile_id, $content, $source, $options=null) {
$defaults = array('uri' => null,
'reply_to' => null,