2017 © Pedro Peláez
 

library options-trait

Trait to make it easy to add options arrays to object classes

image

cubicmushroom/options-trait

Trait to make it easy to add options arrays to object classes

  • Monday, February 23, 2015
  • by ToG
  • Repository
  • 1 Watchers
  • 1 Stars
  • 13 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

Options Trait

This trait is used to provide basic options setting, getting, checking, and merging with defaults, (*2)

Properties

The trait add the following properties to the class..., (*3)

$options

An array to the stroe the array of options in., (*4)

Methods

The trait adds the following methods to the class..., (*5)

hasOption

Returns: boolean, (*6)

Checks if an option is set or not, (*7)

getOption

Returns: mixed, (*8)

Gets a requested option., (*9)

If a second arguments is passed, will return this as the default if the option is not set. If not passed, null is returned., (*10)

setOption

Return: $this, (*11)

Sets an option value, (*12)

setOptions

Return: $this, (*13)

Sets the options to the values given., (*14)

An optional second parameter allows for default values to be passed for options not included in the $options array., (*15)

The Versions

23/02 2015

dev-master

9999999-dev

Trait to make it easy to add options arrays to object classes

  Sources   Download

MIT

The Development Requires

by Toby Griffiths

23/02 2015

1.0.2

1.0.2.0

Trait to make it easy to add options arrays to object classes

  Sources   Download

MIT

The Development Requires

by Toby Griffiths

23/02 2015

1.0.1

1.0.1.0

Trait to make it easy to add options arrays to object classes

  Sources   Download

MIT

The Development Requires

by Toby Griffiths

23/02 2015

1.0.0

1.0.0.0

Trait to make it easy to add options arrays to object classes

  Sources   Download

MIT

The Development Requires

by Toby Griffiths