2017 © Pedro Peláez
 

library bind-facets

Binds icanboogie/facets to ICanBoogie

image

icanboogie/bind-facets

Binds icanboogie/facets to ICanBoogie

  • Sunday, March 18, 2018
  • by olvlvl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 766 Installations
  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

bind-facets

Release Build Status Code Quality Code Coverage Packagist, (*1)

The icanboogie/bind-facets package binds icanboogie/facets to ICanBoogie, using its autoconfig feature, and provides the following features:, (*2)

  • A synthesizer for the activerecord_facets config.
  • A criteria prototype property for Model instances.
  • A criterion_list prototype property for Model instances.
  • A fetch_record() prototype method for Model instances.
  • A fetch_records() prototype method for Model instances.

Hinting prototype bindings

Because most features are provided through prototype methods, your favorite editor might complain about unknown methods, in which case simply use the ModelBindings trait., (*3)

The following example demonstrates how to hint your code about a fetch_records method. Notice the type hint in the annotation Model|ModelBindings:, (*4)

<?php

use ICanBoogie\ActiveRecord\Model;
use ICanBoogie\Binding\Facets\ModelBindings;
use ICanBoogie\Facets\RecordCollection;

/**
 * @param Model|ModelBindings
 *
 * @return RecordCollection
 */
function fetch(Model $model, array $conditions)
{
    return $model->fetch_records($conditions;
}

Requirements

The package requires PHP 7.2 or later., (*5)

Installation

composer require icanboogie/bind-facets

Documentation

The package is documented as part of the ICanBoogie framework documentation. You can generate the documentation for the package and its dependencies with the make doc command. The documentation is generated in the build/docs directory. ApiGen is required. The directory can later be cleaned with the make clean command., (*6)

Testing

Run make test-container to create and log into the test container, then run make test to run the test suite. Alternatively, run make test-coverage to run the test suite with test coverage. Open build/coverage/index.html to see the breakdown of the code coverage., (*7)

License

icanboogie/bind-facets is released under the New BSD License., (*8)

The Versions

18/03 2018

5.0.x-dev

5.0.9999999.9999999-dev https://icanboogie.org/

Binds icanboogie/facets to ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

 

18/03 2018

0.7.x-dev

0.7.9999999.9999999-dev https://icanboogie.org/

Binds icanboogie/facets to ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

 

18/03 2018

dev-master

9999999-dev https://icanboogie.org/

Binds icanboogie/facets to ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

18/03 2018

v0.7.0

0.7.0.0 https://icanboogie.org/

Binds icanboogie/facets to ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

 

24/11 2016

v0.6.0

0.6.0.0 http://icanboogie.org/

Binds icanboogie/facets to ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

23/01 2016

v0.5.0

0.5.0.0 http://icanboogie.org/

Binds icanboogie/facets to ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires

 

06/05 2015

v0.1.0

0.1.0.0 http://icanboogie.org/

Binds icanboogie/facets to ICanBoogie

  Sources   Download

BSD-3-Clause

The Requires