MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/www/mpl.imenso.co/vendor/brozot/laravel-fcm/doc/LaravelFCM-Message-Topics.md
LaravelFCM\Message\Topics
===============

Class Topics

Create topic or a topic condition


* Class name: Topics
* Namespace: LaravelFCM\Message







Methods
-------


### topic

    \LaravelFCM\Message\Topics LaravelFCM\Message\Topics::topic(string $first)

Add a topic, this method should be called before any conditional topic



* Visibility: **public**


#### Arguments
* $first **string** - <p>topicName</p>



### orTopic

    \LaravelFCM\Message\Topics LaravelFCM\Message\Topics::orTopic(string|\Closure $first)

Add a or condition to the precedent topic set

Parenthesis is a closure

Equivalent of this: **'TopicA' in topic' || 'TopicB' in topics**

```
         $topic = new Topics();
         $topic->topic('TopicA')
               ->orTopic('TopicB');
```

Equivalent of this: **'TopicA' in topics && ('TopicB' in topics || 'TopicC' in topics)**

```
         $topic = new Topics();
         $topic->topic('TopicA')
               ->andTopic(function($condition) {
                     $condition->topic('TopicB')->orTopic('TopicC');
         });
```

> Note: Only two operators per expression are supported by fcm

* Visibility: **public**


#### Arguments
* $first **string|Closure** - <p>topicName or closure</p>



### andTopic

    \LaravelFCM\Message\Topics LaravelFCM\Message\Topics::andTopic(string|\Closure $first)

Add a and condition to the precedent topic set

Parenthesis is a closure

Equivalent of this: **'TopicA' in topic' && 'TopicB' in topics**

```
         $topic = new Topics();
         $topic->topic('TopicA')
               ->anTopic('TopicB');
```

Equivalent of this: **'TopicA' in topics || ('TopicB' in topics && 'TopicC' in topics)**

```
         $topic = new Topics();
         $topic->topic('TopicA')
               ->orTopic(function($condition) {
                     $condition->topic('TopicB')->AndTopic('TopicC');
         });
```

> Note: Only two operators per expression are supported by fcm

* Visibility: **public**


#### Arguments
* $first **string|Closure** - <p>topicName or closure</p>



### build

    array|string LaravelFCM\Message\Topics::build()

Transform to array



* Visibility: **public**




### hasOnlyOneTopic

    boolean LaravelFCM\Message\Topics::hasOnlyOneTopic()

Check if only one topic was set



* Visibility: **public**