class InstagramMedia in Drupagram 7
Same name and namespace in other branches
- 6 drupagram.lib.php \InstagramMedia
Class for containing an individual Instagram posts.
Hierarchy
- class \InstagramMedia
Expanded class hierarchy of InstagramMedia
1 string reference to 'InstagramMedia'
- Instagram::fetch in ./
drupagram.lib.php - Get an array of Instagram objects from an API endpoint
File
- ./
drupagram.lib.php, line 585 - Classes to implement the full Instagram API
View source
class InstagramMedia {
public $id;
public $user;
public $type;
public $images;
public $location;
public $comments;
public $caption;
public $link;
public $likes;
public $filter;
public $created_time;
/**
* Constructor for InstagramMedia
*/
public function __construct($values = array()) {
// Filter out null and empty values
$values = array_filter($values);
// Turn values into object attributes
foreach ($values as $key => $value) {
switch ($key) {
case 'user':
$this->user = new InstagramUser($values['user']);
break;
// case 'caption':
// $this->caption = $values['caption']['text'];
// break;
default:
$this->{$key} = $value;
break;
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
InstagramMedia:: |
public | property | ||
InstagramMedia:: |
public | property | ||
InstagramMedia:: |
public | property | ||
InstagramMedia:: |
public | property | ||
InstagramMedia:: |
public | property | ||
InstagramMedia:: |
public | property | ||
InstagramMedia:: |
public | property | ||
InstagramMedia:: |
public | property | ||
InstagramMedia:: |
public | property | ||
InstagramMedia:: |
public | property | ||
InstagramMedia:: |
public | property | ||
InstagramMedia:: |
public | function | Constructor for InstagramMedia |