PHP Classes

How Can You Use a PHP Options Array to Configure Options Using Options Resolver: Configure objects with option arrays

Recommend this page to a friend!

  Author Author  
Picture of Boss Ibrahim Mussa
Name: Boss Ibrahim Mussa <contact>
Classes: 11 packages by
Country: Congo Congo
Innovation award
Innovation award
Nominee: 4x


  Detailed description   Download Download .zip .tar.gz  
This package can help to configure objects with option arrays.

It provides a resolver class that can take the names of a set of options and default values that will be assumed when an option value is missing.

The resolver class can also process an array to extract option values or use default values for missing options.

The OptionsResolver component helps you configure objects with option arrays.

Details

OptionsResolver

Build Status Source Version Downloads License Issues

description

The OptionsResolver component helps you configure objects with option arrays. It supports default values, option constraints and lazy options.


  Classes of Boss Ibrahim Mussa  >  How Can You Use a PHP Options Array to Configure Options Using Options Resolver  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: How Can You Use a PHP Options Array to Configure Options Using Options Resolver
Base name: optionsresolver
Description: Configure objects with option arrays
Version: -
PHP version: 7
License: The PHP License
 
  Groups   Applications   Files Files  

  Groups  
Group folder image Data types Modeling and manipulating data types View top rated classes
Group folder image Language Constructs to assist in the language control View top rated classes
Group folder image Configuration Configuration formats parsing and generation View top rated classes
Group folder image PHP 7 Classes using PHP 7 specific features View top rated classes


  Innovation Award  
PHP Programming Innovation award nominee
December 2022
Nominee
Vote
Many classes need to be configured using options provided by the developers in the code that calls the classes' functions.

One way to pass options values is to use arrays with the names and the values of the options that will be changed.

This package simplifies the processing of options arrays that are passed to classes by extracting the values from arrays or default values defined within the class.

Manuel Lemos

  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imagedemo (2 files)
Files folder imagesrc (2 files, 1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file php.yml Data Auxiliary data

  Files folder image Files  /  demo  
File Role Description
  Plain text file Database.php Class Class source
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files  /  src  
File Role Description
Files folder imageTraits (1 file)
  Plain text file Option.php Class Class source
  Plain text file OptionsResolver.php Class Class source

  Files folder image Files  /  src  /  Traits  
File Role Description
  Plain text file ExceptionTraits.php Class Class source

Download Download all files: optionsresolver.tar.gz optionsresolver.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imagedemo (2 files)
Files folder imagesrc (2 files, 1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file php.yml Data Auxiliary data

  Files folder image Files  /  demo  
File Role Description
  Plain text file Database.php Class Class source
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files  /  src  
File Role Description
Files folder imageTraits (1 file)
  Plain text file Option.php Class Class source
  Plain text file OptionsResolver.php Class Class source

  Files folder image Files  /  src  /  Traits  
File Role Description
  Plain text file ExceptionTraits.php Class Class source

Download Download all files: optionsresolver.tar.gz optionsresolver.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.