protected function get_best_size($photoid) {
        if (!isset(self::$sizes[$photoid])) {
            // Sizes are returned from smallest to greatest.
            self::$sizes[$photoid] = $this->flickr->photos_getSizes($photoid);
        }
        $sizes = self::$sizes[$photoid];
        $bestsize = array();
        if (is_array($sizes)) {
            while ($bestsize = array_pop($sizes)) {
                // Make sure the source is set. Exit the loop if found.
                if (isset($bestsize['source'])) {
                    break;
                }
            }
        }
        return $bestsize;
    }
protected function get_best_size($photoid) {
        if (!isset(self::$sizes[$photoid])) {
            // Sizes are returned from smallest to greatest.
            self::$sizes[$photoid] = $this->flickr->photos_getSizes($photoid);
        }
        $sizes = self::$sizes[$photoid];
        $bestsize = array();
        if (is_array($sizes)) {
            while ($bestsize = array_pop($sizes)) {
                // Make sure the source is set. Exit the loop if found.
                if (isset($bestsize['source'])) {
                    break;
                }
            }
        }
        return $bestsize;
    }
protected function get_best_size ( $ photoid ) { if ( ! isset ( self :: $ sizes [ $ photoid ] ) ) { // Sizes are returned from smallest to greatest. self :: $ sizes [ $ photoid ] = $ this -> flickr -> photos_getSizes ( $ photoid ) ; } $ sizes = self :: $ sizes [ $ photoid ] ; $ bestsize = array ( ) ; if ( is_array ( $ sizes ) ) { while ( $ bestsize = array_pop ( $ sizes ) ) { // Make sure the source is set. Exit the loop if found. if ( isset ( $ bestsize [ 'source' ] ) ) { break ; } } } return $ bestsize ; }
Returns the best size for a photo

@param string $photoid the photo identifier
@return array of information provided by the API
Returns the best size for a photo