Вход Регистрация
Файл: vendor/league/flysystem/src/UnableToRetrieveMetadata.php
Строк: 96
<?php

declare(strict_types=1);

namespace 
LeagueFlysystem;

use 
RuntimeException;
use 
Throwable;

final class 
UnableToRetrieveMetadata extends RuntimeException implements FilesystemOperationFailed
{
    
/**
     * @var string
     */
    
private $location;

    
/**
     * @var string
     */
    
private $metadataType;

    
/**
     * @var string
     */
    
private $reason;

    public static function 
lastModified(string $locationstring $reason '', ?Throwable $previous null): self
    
{
        return static::
create($locationFileAttributes::ATTRIBUTE_LAST_MODIFIED$reason$previous);
    }

    public static function 
visibility(string $locationstring $reason '', ?Throwable $previous null): self
    
{
        return static::
create($locationFileAttributes::ATTRIBUTE_VISIBILITY$reason$previous);
    }

    public static function 
fileSize(string $locationstring $reason '', ?Throwable $previous null): self
    
{
        return static::
create($locationFileAttributes::ATTRIBUTE_FILE_SIZE$reason$previous);
    }

    public static function 
mimeType(string $locationstring $reason '', ?Throwable $previous null): self
    
{
        return static::
create($locationFileAttributes::ATTRIBUTE_MIME_TYPE$reason$previous);
    }

    public static function 
create(string $locationstring $typestring $reason '', ?Throwable $previous null): self
    
{
        
$e = new static("Unable to retrieve the $type for file at location: $location{$reason}"0$previous);
        
$e->reason $reason;
        
$e->location $location;
        
$e->metadataType $type;

        return 
$e;
    }

    public function 
reason(): string
    
{
        return 
$this->reason;
    }

    public function 
location(): string
    
{
        return 
$this->location;
    }

    public function 
metadataType(): string
    
{
        return 
$this->metadataType;
    }

    public function 
operation(): string
    
{
        return 
FilesystemOperationFailed::OPERATION_RETRIEVE_METADATA;
    }
}
Онлайн: 1
Реклама