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

namespace EmbedAdapters;

use 
EmbedHttpResponse;
use 
EmbedUtils;

/**
 * Adapter to generate embed code from ideone.com.
 */
class Ideone extends Webpage
{
    
/**
     * {@inheritdoc}
     */
    
public static function check(Response $response)
    {
        return 
$response->isValid() && $response->getUrl()->match([
            
'ideone.com/*',
        ]);
    }

    
/**
     * {@inheritdoc}
     */
    
public function getCode()
    {
        
$this->width null;
        
$this->height null;

        
$url $this->getResponse()->getUrl();
        
$path '/e.js'.$url->getPath();

        return 
Utils::script($url->getAbsolute($path));
    }
}
Онлайн: 0
Реклама