Skip to content

imoisey/cross

Repository files navigation

Imoisey/Cross

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

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published