MphpD
v1.2.0 Documentation GitHub

# Sticker

Subclass for Stickers.

    MphpD::sticker(string $type, string $uri) : Sticker

## Methods

### __construct

This class is not intended for direct usage. Use `MphpD::sticker()` instead to retrieve an instance of this class.

    Sticker::__construct(FloFaber\MphpD\MphpD $mphpd, string $type, string $uri) : mixed

#### Parameters

- ##### $mphpd

- ##### $type

- ##### $uri

#### Returns `mixed`

### get

Returns the value of the specified sticker

    Sticker::get(string $name) : mixed

#### Parameters

- ##### $name

  Name of the sticker.

#### Returns `mixed`

false|string `string` on success or `false` on failure.

### set

Add a value to the specified sticker.

    Sticker::set(string $name, string $value) : bool

#### Parameters

- ##### $name

  Name of the value.

- ##### $value

  Value of the value.

#### Returns `bool`

bool `true` on success or `false` on failure.

### delete

Deletes the value from the specified sticker.

    Sticker::delete(string $name = '') : bool

#### Parameters

- ##### $name

  If omitted all sticker values will be deleted.

#### Returns `bool`

bool `true` on success or `false` on failure.

### list

Returns an associative array containing sticker names and values of the specified object.

    Sticker::list() : mixed

#### Parameters

None.

#### Returns `mixed`

array|false `array` on success or `false` on failure.

### find

Search the sticker database for sticker with the specified name and/or value in the specified `$uri`

    Sticker::find(string $name, string $operator = '', string $value = '') : mixed

#### Parameters

- ##### $name

  The sticker name

- ##### $operator

  Optional. Can be one of `=`, `<` or `>`. Only in combination with $value.

- ##### $value

  Optional. The value to search for. Only in combination with $operator.

#### Returns `mixed`

array|false `array` on success or `false` on failure.

© 2023 Florian Faber