Вход Регистрация
Файл: vendor/intervention/gif/src/Encoders/ColorTableEncoder.php
Строк: 41
<?php

declare(strict_types=1);

namespace 
InterventionGifEncoders;

use 
InterventionGifBlocksColor;
use 
InterventionGifBlocksColorTable;
use 
InterventionGifExceptionsEncoderException;

class 
ColorTableEncoder extends AbstractEncoder
{
    
/**
     * Create new instance
     *
     * @param ColorTable $source
     */
    
public function __construct(ColorTable $source)
    {
        
$this->source $source;
    }

    
/**
     * Encode current source
     *
     * @throws EncoderException
     * @return string
     */
    
public function encode(): string
    
{
        return 
implode(''array_map(
            
fn(Color $color): string => $color->encode(),
            
$this->source->getColors(),
        ));
    }
}
Онлайн: 0
Реклама