Menu

## ContentsType extends Enum
in package

ContentsType.php : 27

ContentsType enumeration class

##### Tags

category

  Enum

author

  Daniel Muenter info@msltns.com

version
  0.0.1
since
  0.0.1
license

  GPL 3 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

### Table of Contents

COMMERCIAL_GOODS = 'commercial_goods'
COMMERCIAL_SAMPLE = 'commercial_sample'
DOCUMENTS = 'documents'
GIFT = 'gift'
RETURNED_GOODS = 'returned_goods'
$constCacheArray : mixed
get_class_name() : string
  Returns the name of the current instance.
get_name_by_value() : mixed
is_valid_value() : bool
  Validates a given $enum_value against a given $enum_type.
to_string() : string
  For a given $enum_type, give the complete string representation for the given $enum_value (class::const)
__construct() : void
  Due to singleton pattern make sure there are never any instances created.

### Constants

#### COMMERCIAL_GOODS

ContentsType.php : 29
`public mixed COMMERCIAL_GOODS = 'commercial_goods'`

#### COMMERCIAL_SAMPLE

ContentsType.php : 31
`public mixed COMMERCIAL_SAMPLE = 'commercial_sample'`

#### DOCUMENTS

ContentsType.php : 33
`public mixed DOCUMENTS = 'documents'`

#### GIFT

ContentsType.php : 35
`public mixed GIFT = 'gift'`

#### RETURNED_GOODS

ContentsType.php : 37
`public mixed RETURNED_GOODS = 'returned_goods'`

### Properties

#### $constCacheArray

Enum.php : 29
`private static mixed $constCacheArray = NULL`

### Methods

#### get_class_name()

ContentsType.php : 39

Returns the name of the current instance.

`public static get_class_name() : string`

##### Return values

string —

#### get_name_by_value()

Enum.php : 71
`public static get_name_by_value(mixed $enum_type, mixed $enum_value) : mixed`

##### Parameters

$enum_type : mixed
$enum_value : mixed

##### Return values

mixed —

#### is_valid_value()

Enum.php : 56

Validates a given $enum_value against a given $enum_type.

`public static is_valid_value(string $enum_type, string $enum_value) : bool`

##### Parameters

$enum_type : string
$enum_value : string

##### Return values

bool —

#### to_string()

Enum.php : 92

For a given $enum_type, give the complete string representation for the given $enum_value (class::const)

`public static to_string(string $enum_type, string $enum_value) : string`

##### Parameters

$enum_type : string
$enum_value : string

##### Return values

string —

#### __construct()

Enum.php : 36

Due to singleton pattern make sure there are never any instances created.

`private final __construct() : void`

##### Return values

void —

## Search results