# Thumb

class Thumb

## Methods

__construct($storage, $filePath, $cachePrefix = '_slims_img_cache_resolutionWidth_x_resolutionHeight_')

No description

getFilePath()

No description

void
getCacheOption($key)

Get cache option

void
setContentType(string $type = '')

Set header content type

void
setCacheOption(string $key, mixed $value)

Set cache option

value
isFileAllow()

Check if file is allow or not

bool
isFileExists()

Existing file

bool
isReadable()

Read permission is important

bool
isCacheExists()

Cache check

void
setWidth(int|string $width)

Setter for width

void
setHeight(int|string $height)

Setter for height

Thumb
prepare()

Sizing processs

value
orError()

Set error state

static
setError(string $error = 'filenotfound')

No description

void
generate()

Generate thumbnail image and caching image

## Details

###
at line 86
`__construct($storage, $filePath, $cachePrefix = '_slims_img_cache_resolutionWidth_x_resolutionHeight_')`

No description

#### Parameters

| $storage |
| $filePath |
| $cachePrefix |

###
at line 94
`getFilePath()`

No description

###
at line 105
`void getCacheOption($key)`

Get cache option

#### Parameters

| $key |

#### Return Value

void |

###
at line 115
`void setContentType(string $type = '')`

Set header content type

#### Parameters

string | $type |

#### Return Value

void |

###
at line 131
`void setCacheOption(string $key, mixed $value)`

Set cache option

#### Parameters

string | $key |
mixed | $value |

#### Return Value

void |

###
at line 141
`value isFileAllow()`

Check if file is allow or not

#### Return Value

value |

###
at line 154
`bool isFileExists()`

Existing file

#### Return Value

bool |

###
at line 168
`bool isReadable()`

Read permission is important

#### Return Value

bool |

###
at line 182
`bool isCacheExists()`

Cache check

#### Return Value

bool |

###
at line 193
`void setWidth(int|string $width)`

Setter for width

#### Parameters

int|string | $width |

#### Return Value

void |

###
at line 204
`void setHeight(int|string $height)`

Setter for height

#### Parameters

int|string | $height |

#### Return Value

void |

###
at line 214
`Thumb prepare()`

Sizing processs

#### Return Value

Thumb |

###
at line 233
`value orError()`

Set error state

#### Return Value

value |

###
at line 239
`static setError(string $error = 'filenotfound')`

No description

#### Parameters

string | $error |

###
at line 253
`void generate()`

Generate thumbnail image and caching image

#### Return Value

void |