# webrootimg.php

Resize and crop images on the fly, store generated images in a cache.

Package
  \Default
See also
  https://github.com/mosbth/cimage

## Tags

author | Mikael Roos mos@dbwebb.se
example |

## Functions

### errorPage()

    errorPage(string  $msg) : void

Display error message.

#### Parameters

string | $msg | to display.

#

File
  webroot/img.php

## Tags

package | Default

### get()

    get(mixed  $key, mixed  $default = null) : mixed

Get input from query string or return default value if not set.

#### Parameters

mixed | $key | as string or array of string values to look for in $_GET.
mixed | $default | value to return when $key is not set in $_GET.

#### Returns

mixed —

value from $_GET or default value.

#

File
  webroot/img.php

## Tags

package | Default

### getDefined()

    getDefined(mixed  $key, mixed  $defined, mixed  $undefined) : mixed

Get input from query string and set to $defined if defined or else $undefined.

#### Parameters

mixed | $key | as string or array of string values to look for in $_GET.
mixed | $defined | value to return when $key is set in $_GET.
mixed | $undefined | value to return when $key is not set in $_GET.

#### Returns

mixed —

value as $defined or $undefined.

#

File
  webroot/img.php

## Tags

package | Default

### getConfig()

    getConfig(string  $key, mixed  $default) : mixed

Get value from config array or default if key is not set in config array.

#### Parameters

string | $key | the key in the config array.
mixed | $default | value to be default if $key is not set in config.

#### Returns

mixed —

value as $config[$key] or $default.

#

File
  webroot/img.php

## Tags

package | Default

### verbose()

    verbose(string  $msg = null) : void

Log when verbose mode, when used without argument it returns the result.

#### Parameters

string | $msg | to log.

#

File
  webroot/img.php

## Tags

package | Default

###