imoisey/cross

Библиотека для поиска временных пересечений.

Maintainers

Details

github.com/imoisey/cross

Source

Issues

Fund package maintenance!
Open Collective

Installs: 46

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

Language:HTML

0.1.2 2019-11-11 14:58 UTC

This package is auto-updated.

Last update: 2024-05-27 23:03:57 UTC


README

Библиотека для поиска временных пересечений.

Installation

Установка через менеджер пакетов composer.

composer require imoisey/cross

Usage

Создать класс провайдера данных, который будет реализовывать интерфейс ProviderInterface.

use Imoisey\Cross\Provider\ProviderInterface;

class PeopleProvider implements ProviderInterface
{

    public function getCollections()
    {

    }


    public function getName()
    {

    }
}

Создать класс коллекции, который будет расширять абстрактный класс Collection.

use Imoisey\Cross\Collection\Collection;

class PeopleCollection extends Collection
{

}

Создать класс элемента, который будет являться частью коллекции и реализовать интерфейс ItemInteface.

use Imoisey\Cross\ItemInterface;

class EventItem extends ItemInterface
{
    public function getPeriod()
    {

    }
}

Выполнить настройку менеджера пересечений.

use Imoisey\Cross\Manager;

$provider = new PeopleProvider();
$manager = new Manager($provider);

if ($manager->verify()) {
    $manager->getCollision();
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT