waryway/php-traits-library

General use traits

1.0.4 2017-12-23 14:22 UTC

This package is auto-updated.

Last update: 2024-05-09 11:40:23 UTC


README

General PHP traits for ease of development

Status

Build Status

Usage

  1. Include this package through composer.
  2. Use the composer autoloader
  3. Reference through through psr-4 namespaces

Singleton

Prevent instantiation of 'single instance' object. The standard php singleton trait.

Hydrator

Rest likes standard class objects. Hydrating php object can be easy. Follow the hydrator pattern.

Generator

The generator trait currently supports reading from a file with an optional line parser