|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <title>MphpD - Channel</title> |
| 5 | + <link rel="stylesheet" href="/css/main.css"> |
| 6 | + <link rel="stylesheet" href="/highlight/styles/atom-one-dark-reasonable.min.css"> |
| 7 | + <link rel="icon" href="/favicon.png" type="image/png"/> |
| 8 | + <script src="/highlight/highlight.min.js"></script> |
| 9 | + <meta charset="utf-8"> |
| 10 | + <meta name="description" content="MphpD - A fully-featured, dependency-free PHP library for MPD."> |
| 11 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 12 | +</head> |
| 13 | +<body> |
| 14 | +<div id="header"> |
| 15 | + <div> |
| 16 | + <a href="/">MphpD</a> |
| 17 | + </div> |
| 18 | + <div id="header-right"> |
| 19 | + <span>v1.2.1</span> |
| 20 | + <a href="/latest/overview.html">Documentation</a> |
| 21 | + <a href="https://github.com/FloFaber/MphpD">GitHub</a> |
| 22 | + </div> |
| 23 | +</div> |
| 24 | +<div id="body"> |
| 25 | + <!-- class template start --> |
| 26 | +<h1 class="method-name">Channel</h1> |
| 27 | +<p><p>This subclass is used for client-to-client communication over MPD</p></p> |
| 28 | + |
| 29 | +<pre><code class="language-php">MphpD::channel(string $name) : Channel</code></pre> |
| 30 | + |
| 31 | +<h2>Methods</h2> |
| 32 | + |
| 33 | +<!-- method template start --> |
| 34 | +<div class="method"> |
| 35 | +<h3 class="method-name">__construct</h3> |
| 36 | +<p> |
| 37 | + <p>This class is not intended for direct usage. |
| 38 | +Use <code>MphpD::channel()</code> instead to retrieve an instance of this class.</p> |
| 39 | +</p> |
| 40 | + |
| 41 | +<pre><code class="language-php">Channel::__construct(FloFaber\MphpD\MphpD $mphpd, string $name) : mixed</code></pre> |
| 42 | + |
| 43 | +<h4 style="margin-top: 35px;">Parameters</h4> |
| 44 | + <ul> |
| 45 | + <li><h5>$mphpd</h5></li> |
| 46 | +<li><h5>$name</h5></li> |
| 47 | + |
| 48 | + </ul> |
| 49 | + |
| 50 | +<h4 style="margin-top: 35px;">Returns <code>mixed</code></h4> |
| 51 | +<p> |
| 52 | + |
| 53 | +</p> |
| 54 | +</div> |
| 55 | +<!-- method template end --> |
| 56 | +<!-- method template start --> |
| 57 | +<div class="method"> |
| 58 | +<h3 class="method-name">subscribe</h3> |
| 59 | +<p> |
| 60 | + <p>Subscribe to the channel.</p> |
| 61 | +</p> |
| 62 | + |
| 63 | +<pre><code class="language-php">Channel::subscribe() : bool</code></pre> |
| 64 | + |
| 65 | +<h4 style="margin-top: 35px;">Parameters</h4> |
| 66 | + <ul> |
| 67 | + <i>None.</i> |
| 68 | + </ul> |
| 69 | + |
| 70 | +<h4 style="margin-top: 35px;">Returns <code>bool</code></h4> |
| 71 | +<p> |
| 72 | + <p>bool <code>true</code> on success or <code>false</code> on failure.</p> |
| 73 | +</p> |
| 74 | +</div> |
| 75 | +<!-- method template end --> |
| 76 | +<!-- method template start --> |
| 77 | +<div class="method"> |
| 78 | +<h3 class="method-name">unsubscribe</h3> |
| 79 | +<p> |
| 80 | + <p>Unsubscribe the channel.</p> |
| 81 | +</p> |
| 82 | + |
| 83 | +<pre><code class="language-php">Channel::unsubscribe() : bool</code></pre> |
| 84 | + |
| 85 | +<h4 style="margin-top: 35px;">Parameters</h4> |
| 86 | + <ul> |
| 87 | + <i>None.</i> |
| 88 | + </ul> |
| 89 | + |
| 90 | +<h4 style="margin-top: 35px;">Returns <code>bool</code></h4> |
| 91 | +<p> |
| 92 | + <p>bool <code>true</code> on success or <code>false</code> on failure.</p> |
| 93 | +</p> |
| 94 | +</div> |
| 95 | +<!-- method template end --> |
| 96 | +<!-- method template start --> |
| 97 | +<div class="method"> |
| 98 | +<h3 class="method-name">read</h3> |
| 99 | +<p> |
| 100 | + <p>Returns a list of the channel's messages.</p> |
| 101 | +</p> |
| 102 | + |
| 103 | +<pre><code class="language-php">Channel::read() : mixed</code></pre> |
| 104 | + |
| 105 | +<h4 style="margin-top: 35px;">Parameters</h4> |
| 106 | + <ul> |
| 107 | + <i>None.</i> |
| 108 | + </ul> |
| 109 | + |
| 110 | +<h4 style="margin-top: 35px;">Returns <code>mixed</code></h4> |
| 111 | +<p> |
| 112 | + <p>array|false <code>array</code> containing the messages on success or <code>false</code> on failure.</p> |
| 113 | +</p> |
| 114 | +</div> |
| 115 | +<!-- method template end --> |
| 116 | +<!-- method template start --> |
| 117 | +<div class="method"> |
| 118 | +<h3 class="method-name">send</h3> |
| 119 | +<p> |
| 120 | + <p>Send a message to the channel.</p> |
| 121 | +</p> |
| 122 | + |
| 123 | +<pre><code class="language-php">Channel::send(string $message) : bool</code></pre> |
| 124 | + |
| 125 | +<h4 style="margin-top: 35px;">Parameters</h4> |
| 126 | + <ul> |
| 127 | + <li><h5>$message</h5><p>The message text.</p></li> |
| 128 | + |
| 129 | + </ul> |
| 130 | + |
| 131 | +<h4 style="margin-top: 35px;">Returns <code>bool</code></h4> |
| 132 | +<p> |
| 133 | + <p>bool <code>true</code> on success or <code>false</code> on failure.</p> |
| 134 | +</p> |
| 135 | +</div> |
| 136 | +<!-- method template end --> |
| 137 | + |
| 138 | +<!-- class template end --> |
| 139 | +</div> |
| 140 | +<div style="text-align: center; padding: 30px;">© 2023 Florian Faber</div> |
| 141 | +<script>hljs.highlightAll();</script> |
| 142 | +<script type="text/javascript" src="/js/main.js"></script> |
| 143 | +</body> |
| 144 | +</html> |
0 commit comments