Вход Регистрация
Файл: sngine-v2.8/Script/includes/libs/Embed/Adapters/Flickr.php
Строк: 24
<?php

namespace EmbedAdapters;

use 
EmbedHttpResponse;
use 
EmbedUtils;

/**
 * Adapter provider more information from flickr.
 */
class Flickr extends Webpage
{
    
/**
     * {@inheritdoc}
     */
    
public static function check(Response $response)
    {
        return 
$response->isValid() && $response->getUrl()->match([
            
'www.flickr.com/photos/*',
        ]);
    }

    
/**
     * {@inheritdoc}
     */
    
public function getCode()
    {
        
$code parent::getCode();

        if (empty(
$code)) {
            
$this->width 640;
            
$this->height 425;

            
$code Utils::iframe($this->getResponse()->getUrl()->withAddedPath('player'), $this->width$this->height);
        }

        return 
$code;
    }

    
/**
     * {@inheritdoc}
     */
    
public function getProviderName()
    {
        return 
'Flickr';
    }
}
Онлайн: 0
Реклама