AbstractCondition::getKeyword()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 1
nc 1
1
<?php
2
3
namespace Ddeboer\Imap\Search;
4
5
/**
6
 * Represents a condition that can be used in a search expression.
7
 */
8
abstract class AbstractCondition
9
{
10
    /**
11
     * Converts the condition to a string that can be sent to the IMAP server.
12
     *
13
     * @return string
14
     */
15
    public function __toString()
16
    {
17
        return $this->getKeyword();
18
    }
19
20
    /**
21
     * Returns the keyword that the condition represents.
22
     *
23
     * @return string
24
     */
25
    abstract protected function getKeyword();
26
}
27