SunnyCashLogoStorageWriter
in package
implements
SunnyCashLogoStorageWriterInterface
Class SunnyCashLogoStorageWriter
Interfaces, Classes and Traits
- SunnyCashLogoStorageWriterInterface
- Interface SunnyCashLogoStorageWriterInterface
Table of Contents
- $curl : CurlRequest
- $rootDirectory : ExistingDirectory
- __construct() : mixed
- SunnyCashLogoStorageWriter constructor.
- store() : mixed
- Gets a new version of the requested logo from SunnyCash.
- generateFilename() : string
- Replaces all characters of a string that are illegal in common filesystems with an underscore (_) and returns it.
- getLogoFromSunnyCash() : string
- Gets the string representation of the requested logo.
- storeToFileSystem() : mixed
- Stores the image file to the storage directory.
Properties
$curl
protected
CurlRequest
$curl
$rootDirectory
protected
ExistingDirectory
$rootDirectory
Methods
__construct()
SunnyCashLogoStorageWriter constructor.
public
__construct(CurlRequest $curl, ExistingDirectory $rootDirectory) : mixed
Parameters
- $curl : CurlRequest
- $rootDirectory : ExistingDirectory
Return values
mixed —store()
Gets a new version of the requested logo from SunnyCash.
public
store(StringType $logoUrl) : mixed
Parameters
- $logoUrl : StringType
-
The requested logo
Tags
Return values
mixed —generateFilename()
Replaces all characters of a string that are illegal in common filesystems with an underscore (_) and returns it.
protected
generateFilename(StringType $subject) : string
Parameters
- $subject : StringType
Return values
string —getLogoFromSunnyCash()
Gets the string representation of the requested logo.
protected
getLogoFromSunnyCash(StringType $logoUrl) : string
Parameters
- $logoUrl : StringType
Tags
Return values
string —imageString of the logo
storeToFileSystem()
Stores the image file to the storage directory.
protected
storeToFileSystem(StringType $image, StringType $filename) : mixed
Parameters
- $image : StringType
- $filename : StringType