Skip to content
/ CalendR Public
forked from yohang/CalendR

The missing PHP 5.3+ calendar management library.

License

Notifications You must be signed in to change notification settings

jchr86/CalendR

 
 

Repository files navigation

CalendR

Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight

CalendR is an Object Oriented Calendar management library on top of PHP5.3+ Date objects. You can use it to deal with all your needs about calendars and events.

Complete documentation

Complete documentation is available here.

Installation

CalendR is hosted on packagist, you can install it with composer.

Open a command console, enter your project directory and execute:

$ composer require jchr86/calendr

Applications that use Symfony Flex

Enable the Bundle.

Enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    CalendR\Bridge\Symfony\Bundle\CalendRBundle::class => ['all' => true],
];

Register an event provider.

// src/Repository/EventRepository.php

namespace App\Repository;

use App\Entity\Event;
use CalendR\Bridge\Doctrine\ORM\EventRepository;
use CalendR\Event\Provider\ProviderInterface;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Common\Persistence\ManagerRegistry;
use Doctrine\ORM\Query\Expr;

class EventRepository extends ServiceEntityRepository implements ProviderInterface
{
    use EventRepository;

    public function __construct(ManagerRegistry $registry)
    {
        parent::__construct($registry, Event::class);
    }
}
// config/services.yaml

services:
    App\Repository\EventRepository:
        tags:
            - { name: calendr.event_provider }

Contribute

Calendar is open to contributions. Merging delays can vary depending to my free time, but always be welcome.

License

CalendR is licensed under the MIT License - see the LICENSE file for details

About

The missing PHP 5.3+ calendar management library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%