fogproject
1.5.9
About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE. Fossies Dox: fogproject-1.5.9.tar.gz ("unofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file.
29 =
'https://api.pushbullet.com/v2/pushes';
31 =
'https://api.pushbullet.com/v2/devices';
33 =
'https://api.pushbullet.com/v2/contacts';
35 =
'https://api.pushbullet.com/v2/upload-request';
37 =
'https://api.pushbullet.com/v2/users';
39 =
'https://api.pushbullet.com/v2/subscriptions';
41 =
'https://api.pushbullet.com/v2/channel-info';
43 =
'https://api.pushbullet.com/v2/ephemerals';
53 $this->_apiKey = $apiKey;
54 if (!function_exists(
'curl_init')) {
56 'cURL library is not loaded.'
80 $data[
'type'] =
'note';
81 $data[
'title'] = $title;
82 $data[
'body'] = $body;
111 $data[
'type'] =
'link';
112 $data[
'title'] = $title;
114 $data[
'body'] = $body;
141 $data[
'type'] =
'address';
142 $data[
'name'] = $name;
143 $data[
'address'] = $address;
170 $data[
'type'] =
'list';
171 $data[
'title'] = $title;
204 $fullFilePath = realpath($filePath);
205 if (!is_readable($fullFilePath)) {
207 'File: File does not exist or is unreadable.'
210 if (self::getFilesize($fullFilePath) > 25 * 1024 * 1024) {
212 'File: File size exceeds 25 MB.'
215 $data[
'file_name'] = $altFileName ===
null ?
216 basename($fullFilePath) :
219 $data[
'file_type'] = $mimeType ===
null ?
220 mime_content_type($fullFilePath) :
224 self::URL_UPLOAD_REQUEST,
229 if (version_compare(PHP_VERSION,
'5.5.0',
'>=')) {
230 $response->data->file =
new CURLFile($fullFilePath);
232 $response->data->file =
'@' . $fullFilePath;
246 $data[
'type'] =
'file';
247 $data[
'title'] = $title;
248 $data[
'body'] = $body;
275 $data[
'modified_after'] = $modifiedAfter;
276 if ($cursor !==
null) {
277 $data[
'cursor'] = $cursor;
279 if ($limit !==
null) {
280 $data[
'limit'] = $limit;
299 self::URL_PUSHES .
'/' . $pushIden,
301 array(
'dismissed' =>
true)
315 self::URL_PUSHES .
'/' . $pushIden,
339 $data[
'modified_after'] = $modifiedAfter;
340 if ($cursor !==
null) {
341 $data[
'cursor'] = $cursor;
343 if ($limit !==
null) {
344 $data[
'limit'] = $limit;
363 self::URL_DEVICES .
'/' . $deviceIden,
378 if (filter_var($email, FILTER_VALIDATE_EMAIL) ===
false) {
380 'Create contact: Invalid email address.'
413 $data[
'modified_after'] = $modifiedAfter;
414 if ($cursor !==
null) {
415 $data[
'cursor'] = $cursor;
417 if ($limit !==
null) {
418 $data[
'limit'] = $limit;
438 self::URL_CONTACTS .
'/' . $contactIden,
440 array(
'name' => $name)
454 self::URL_CONTACTS .
'/' . $contactIden,
466 return $this->
_curlRequest(self::URL_USERS .
'/me',
'GET');
479 self::URL_USERS .
'/me',
481 array(
'preferences' => $preferences)
495 self::URL_SUBSCRIPTIONS,
497 array(
'channel_tag' => $channelTag)
508 return $this->
_curlRequest(self::URL_SUBSCRIPTIONS,
'GET');
521 self::URL_SUBSCRIPTIONS .
'/' . $channelIden,
536 self::URL_CHANNEL_INFO,
538 array(
'tag' => $channelTag)
555 public function sendSms($fromDeviceIden, $toNumber, $message)
560 'type' =>
'messaging_extension_reply',
561 'package_name' =>
'com.pushbullet.android',
563 'target_device_iden' => $fromDeviceIden,
564 'conversation_iden' => $toNumber,
565 'message' => $message
580 $this->_curlCallback = $callback;
593 if (!empty($recipient)) {
594 if (filter_var($recipient, FILTER_VALIDATE_EMAIL) !==
false) {
595 $data[email] = $recipient;
597 if (substr($recipient, 0, 1) ==
"#") {
598 $data[channel_tag] = substr($recipient, 1);
600 $data[device_iden] = $recipient;
624 $data = self::$FOGURLRequests->process(
636 return json_decode(
$data[0]);
subscribeToChannel($channelTag)
updateContact($contactIden, $name)
createContact($name, $email)
updateUserPreferences($preferences)
addCurlCallback(callable $callback)
getChannelInformation($channelTag)
getPushHistory( $modifiedAfter=0, $cursor=null, $limit=null)
pushList( $recipient, $title, array $items)
sendSms($fromDeviceIden, $toNumber, $message)
deleteContact($contactIden)
pushNote( $recipient, $title, $body=null)
static _parseRecipient($recipient, array &$data)
deleteDevice($deviceIden)
getContacts( $modifiedAfter=0, $cursor=null, $limit=null)
pushAddress( $recipient, $name, $address)
getDevices( $modifiedAfter=0, $cursor=null, $limit=null)
_curlRequest( $url, $method, $data=null, $sendAsJSON=false, $auth=true)
pushLink( $recipient, $title, $url, $body=null)
unsubscribeFromChannel($channelIden)
pushFile( $recipient, $filePath, $mimeType=null, $title=null, $body=null, $altFileName=null)