src/RestGalleries/APIs/Flickr/Gallery.php
private function extractGalleryArray($data)
    {
        if ($data->stat == 'fail') {
            return;
        }

        $photoset = &$data->photoset;
        $photo    = $this->newPhoto();

        $gallery                = [];
        $gallery['id']          = $photoset->id;
        $gallery['title']       = $photoset->title->_content;
        $gallery['description'] = $photoset->description->_content;
        $gallery['photos']      = $photo->all($photoset->id);
        $gallery['created']     = (string) $photoset->date_create;
        $gallery['url']         = 'https://www.flickr.com/photos/';
        $gallery['url']         .= $photoset->owner;
        $gallery['url']         .= '/sets/';
        $gallery['url']         .= $photoset->id;
        $gallery['size']        = $photoset->count_photos;
        $gallery['user_id']     = $photoset->owner;
        $gallery['thumbnail']   = $photoset->primary;
        $gallery['views']       = $photoset->count_views;

        return $gallery;

    }
private function extractGalleryArray($data)
    {
        if ($data->stat == 'fail') {
            return;
        }

        $photoset = &$data->photoset;
        $photo    = $this->newPhoto();

        $gallery                = [];
        $gallery['id']          = $photoset->id;
        $gallery['title']       = $photoset->title->_content;
        $gallery['description'] = $photoset->description->_content;
        $gallery['photos']      = $photo->all($photoset->id);
        $gallery['created']     = (string) $photoset->date_create;
        $gallery['url']         = 'https://www.flickr.com/photos/';
        $gallery['url']         .= $photoset->owner;
        $gallery['url']         .= '/sets/';
        $gallery['url']         .= $photoset->id;
        $gallery['size']        = $photoset->count_photos;
        $gallery['user_id']     = $photoset->owner;
        $gallery['thumbnail']   = $photoset->primary;
        $gallery['views']       = $photoset->count_views;

        return $gallery;

    }
Extracts the data for the object gallery from the array data given, normalizes them and returns them.

@param  object $data
@return array|null