Files
wiosna-dev_common-library/docs/Value-Objects.md
Meritoo 292c5e6d4f Arrays > getNonEmptyValues() method > returns non-empty values, e.g. without "" (empty string), null or []
Arrays > getNonEmptyValuesAsString() method > returns non-empty values concatenated by given separator
2019-02-22 14:19:17 +01:00

1.1 KiB
Raw Blame History

Meritoo Common Library

Common and useful classes, methods, exceptions etc.

Value Objects

Located in Meritoo\Common\ValueObject namespace.

Version

Namespace

Meritoo\Common\ValueObject\Version

Info

Represents version of software. Contains 3 properties:

  1. $majorPart - the "major" part of version
  2. $minorPart - the "minor" part of version
  3. $patchPart - the "patch" part of version
New instance

New instance can be created using:

  1. Constructor:

    new Version(1, 0, 2);
    
  2. Static methods:

    1. fromArray() - creates new instance using given version as array
    Version::fromArray([1, 0, 2]);
    
    1. fromString() - creates new instance using given version as string:
    Version::fromString('1.0.2');
    

More

  1. Base test case (with common methods and data providers)
  2. Collection of elements
  3. Exceptions
  4. Static methods
    1. Arrays
    2. Regex
  5. Value Objects

Back to Readme