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

declare(strict_types=1);

namespace 
InterventionGifEncoders;

use 
InterventionGifBlocksColor;
use 
InterventionGifBlocksColorTable;
use 
InterventionGifExceptionsEncoderException;

class 
ColorTableEncoder extends AbstractEncoder
{
    
/**
     * Create new instance.
     */
    
public function __construct(ColorTable $entity)
    {
        
parent::__construct($entity);
    }

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