<commit_before># Resistance

Resistance is a simple Redis key manager for PHP. It does not try to be a fully featured ORM, just to make keyspace 
management easier.

## How to use?

Include it in your project using Composer:

```json
{
    "require": {
        "activecollab/resistance": "~0.1"
    }
}
```

Implement a storage:

```php
<?php
  namespace My\App\Storage;

  use Predis\Client;
  use ActiveCollab\Resistance\Storage\Storage;
  use ActiveCollab\Resistance\Storage\Field\StringField;
  use ActiveCollab\Resistance\Storage\Field\IntegerField;

  /**
   * @package ActiveCollab\GrandCentral\Storage
   */
  final class MyObjects extends Storage
  {
    /**
     * Construct a new storage instance
     *
     * @param Client $connection
     * @param string $application_namespace
     */
    public function __construct(Client &$connection, $application_namespace)
    {
      parent::__construct($connection, $application_namespace);

      $this->setFields([
        'url'           => (new StringField)->required()->isUrl()->modifier('trim'),
        'is_paid'       =>  new BooleanField,
        'members_count' =>  new IntegerField,
        'clients_count' =>  new IntegerField,
      ]);

      $this->makeUnique('url');
    }<commit_msg>Added BooleanField to use statement in README.md<commit_after># Resistance

Resistance is a simple Redis key manager for PHP. It does not try to be a fully featured ORM, just to make keyspace 
management easier.

## How to use?

Include it in your project using Composer:

```json
{
    "require": {
        "activecollab/resistance": "~0.1"
    }
}
```

Implement a storage:

```php
<?php
  namespace My\App\Storage;

  use Predis\Client;
  use ActiveCollab\Resistance\Storage\Storage;
  use ActiveCollab\Resistance\Storage\Field\StringField;
  use ActiveCollab\Resistance\Storage\Field\IntegerField;
  use ActiveCollab\Resistance\Storage\Field\BooleanField;

  /**
   * @package ActiveCollab\GrandCentral\Storage
   */
  final class MyObjects extends Storage
  {
    /**
     * Construct a new storage instance
     *
     * @param Client $connection
     * @param string $application_namespace
     */
    public function __construct(Client &$connection, $application_namespace)
    {
      parent::__construct($connection, $application_namespace);

      $this->setFields([
        'url'           => (new StringField)->required()->isUrl()->modifier('trim'),
        'is_paid'       =>  new BooleanField,
        'members_count' =>  new IntegerField,
        'clients_count' =>  new IntegerField,
      ]);

      $this->makeUnique('url');
    }
{'fraction_non_alphanumeric': 0.11593090211132438, 'fraction_numerical': 0.0015355086372360845, 'mean_word_length': 3.084639498432602, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6552637', 'n_tokens_mistral': 774, 'n_tokens_neox': 750, 'n_words': 198}