Maslosoft Mangan API
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
<?php
/**
* This software package is licensed under AGPL or Commercial license.
*
* @package maslosoft/mangan
* @licence AGPL or Commercial
* @copyright Copyright (c) Piotr Masełkowski <pmaselkowski@gmail.com>
* @copyright Copyright (c) Maslosoft
* @copyright Copyright (c) Others as mentioned in code
* @link https://maslosoft.com/mangan/
*/
namespace Maslosoft\Mangan\Meta;
use Maslosoft\Addendum\Collections\MetaProperty;
use Maslosoft\Mangan\EntityManager;
use Maslosoft\Mangan\Sort;
use Maslosoft\Mangan\Transformers\DocumentArray;
use Maslosoft\Mangan\Transformers\JsonArray;
/**
* DocumentPropertyMeta
*
* @author Piotr Maselkowski <pmaselkowski at gmail.com>
*/
class DocumentPropertyMeta extends MetaProperty
{
/**
* Field label
* @var string
*/
public $label = '';
/**
* Description
* @var string
*/
public $description = '';
/**
* DB Ref metadata
* @var DbRefMeta
*/
public $dbRef = null;
/**
* Embedded document meta data
* @var EmbeddedMeta
*/
public $embedded = null;
/**
* Related document meta data
* @var RelatedMeta
*/
public $related = null;
/**
* If document is owned set this to true.
*
* **NOTE**: This should not be set directly, but rather by annotations.
*
* @var bool
*/
public $owned = false;
/**
* When ownered decide if should be updatable
*
* **NOTE**: This should not be set directly, but rather by annotations.
*
* @var bool
*/
public $updatable = true;
/**
* I18N metadata
* @var I18NMeta
*/
public $i18n = null;
/**
* Decorators
* @var string[]
*/
public $decorators = [];
/**
* Sanitizer short name or class name or configuration.
*
* Example will resolve to `\Maslosoft\Mangan\Sanitizers\MongoObjectId`:
*
* ```php
* $sanitizer = 'MongoObjectId';
* ```
*
* Or use full class name:
*
* ```php
* $sanitizer = \Maslosoft\Mangan\Sanitizers\MongoObjectId::class;
* ```
*
* Or configuration:
*
* ```php
* $sanitizer = [
* \Maslosoft\Mangan\Sanitizers\MongoObjectId::class,
* 'nullable' => true
* ];
* ```
*
* @var string|mixed[]
*/
public $sanitizer = null;
/**
* Whether sanitization should be performed for array of elements
* @var bool
*/
public $sanitizeArray = false;
/**
* If field should be persistent, by default true
* @var bool
*/
public $persistent = true;
/**
* Whether attribute is safe for mass assignement
* @see EntityManager::setAttributes()
* @var boolean|null
*/
public $safe = null;
/**
* Whether property is read only
* @var bool
*/
public $readonly = false;
/**
* Whether property should be included when converting to Json
* @see JsonArray
* @var bool
*/
public $toJson = true;
/**
* Whether property should be included when converting from Json
* @see JsonArray
* @var bool
*/
public $fromJson = true;
/**
* Whether property should be included when converting to document array
* @see DocumentArray
* @var bool
*/
public $toArray = true;
/**
* Whether property should be included when converting from document array
* @see DocumentArray
* @var bool
*/
public $fromArray = true;
/**
* Whether property is secret
* @var bool|SecretMeta
*/
public $secret = false;
/**
* Whether events should be propagated to this property sub objects
* @var bool
*/
public $propagateEvents = false;
/**
* Validators configuration
* @var ValidatorMeta[]
*/
public $validators = [];
/**
* Index specification.
*
* @var IndexMeta[]
*/
public $index = null;
}
API documentation generated by ApiGen