PHP 8.2.31
Preview: ArraySchema.php Size: 765 B
/home/nshryvcy/himaltourism.com/wp-content/plugins/mailpoet/lib/Validator/Schema/ArraySchema.php

<?php declare(strict_types = 1);

namespace MailPoet\Validator\Schema;

if (!defined('ABSPATH')) exit;


use MailPoet\Validator\Schema;

// See: https://developer.wordpress.org/rest-api/extending-the-rest-api/schema/#arrays
class ArraySchema extends Schema {
  protected $schema = [
    'type' => 'array',
  ];

  public function items(Schema $schema): self {
    return $this->updateSchemaProperty('items', $schema->toArray());
  }

  public function minItems(int $value): self {
    return $this->updateSchemaProperty('minItems', $value);
  }

  public function maxItems(int $value): self {
    return $this->updateSchemaProperty('maxItems', $value);
  }

  public function uniqueItems(): self {
    return $this->updateSchemaProperty('uniqueItems', true);
  }
}

Directory Contents

Dirs: 0 × Files: 10

Name Size Perms Modified Actions
1.01 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
765 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
326 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
0 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
1.07 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
320 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
1.08 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
1.65 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
1.01 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
1.48 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).