# danog\MadelineProto\EventHandler\Privacy\Rule: Represents a privacy rule.

[Back to index](../../../../index.html)

> Author: Daniil Gentili <daniil@daniil.it>  
  

Represents a privacy rule.  




## Constants
* `danog\MadelineProto\EventHandler\Privacy\Rule::STATUS_TIMESTAMP`: Whether we can see the last online timestamp of this user

* `danog\MadelineProto\EventHandler\Privacy\Rule::CHAT_INVITE`: Whether the user can be invited to chats

* `danog\MadelineProto\EventHandler\Privacy\Rule::PHONE_CALL`: Whether the user accepts phone calls

* `danog\MadelineProto\EventHandler\Privacy\Rule::PHONE_P2P`: Whether P2P connections in phone calls with this user are allowed

* `danog\MadelineProto\EventHandler\Privacy\Rule::FORWARDS`: Whether messages forwarded from the user will be [anonymously forwarded](https://telegram.org/blog/unsend-privacy-emoji#anonymous-forwarding)

* `danog\MadelineProto\EventHandler\Privacy\Rule::PROFILE_PHOTO`: Whether the profile picture of the user is visible

* `danog\MadelineProto\EventHandler\Privacy\Rule::PHONE_NUMBER`: Whether the user allows us to see his phone number

* `danog\MadelineProto\EventHandler\Privacy\Rule::ADDED_BY_PHONE`: Whether this user can be added to our contact list by their phone number

* `danog\MadelineProto\EventHandler\Privacy\Rule::VOICE_MESSAGES`: Whether the user accepts voice messages

* `danog\MadelineProto\EventHandler\Privacy\Rule::ABOUT`: Whether the user can see our bio.

* `danog\MadelineProto\EventHandler\Privacy\Rule::MESSAGES_WITHOUT_PAYING`: Whether the user can send us messages without paying.

## Properties
* `$name`: `string` 
* `$value`: `string` 

## Method list:
* [`cases(): array`](#cases)
* [`from(string|int $value): static`](#from)
* [`tryFrom(string|int $value): ?static`](#tryFrom)

## Methods:
### <a name="cases"></a> `cases(): array`





### <a name="from"></a> `from(string|int $value): static`




Parameters:

* `$value`: `string|int`   



### <a name="tryFrom"></a> `tryFrom(string|int $value): ?static`




Parameters:

* `$value`: `string|int`   



---
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
