1 | <?php |
||
5 | abstract class AnyStrObj |
||
6 | { |
||
7 | protected $raw; |
||
8 | |||
9 | public function __construct($thing) |
||
14 | |||
15 | /** |
||
16 | * @return mixed |
||
17 | */ |
||
18 | public function __get($name) |
||
22 | |||
23 | /** |
||
24 | * @return string |
||
25 | */ |
||
26 | public function __toString() |
||
30 | |||
31 | public abstract function compareTo($str, $mode = self::NORMAL, $length = 1); |
||
32 | |||
33 | public function asciify($removeUnsupported = true) |
||
44 | |||
45 | public abstract function escape($mode = self::NORMAL, $charlist = ''); |
||
46 | |||
47 | public abstract function nextToken($delim); |
||
48 | |||
49 | public abstract function remove($str, $mode = self::NORMAL); |
||
50 | |||
51 | public abstract function repeat($times); |
||
52 | |||
53 | /** |
||
54 | * @param string $replace |
||
55 | */ |
||
56 | public abstract function replace($search, $replace, $mode = self::NORMAL); |
||
57 | |||
58 | public abstract function resetToken(); |
||
59 | |||
60 | public abstract function times($times); |
||
61 | |||
62 | public abstract function translate($search, $replace = ''); |
||
63 | |||
64 | public abstract function trim($mask = " \t\n\r\0\x0B", $mode = self::BOTH_ENDS); |
||
65 | |||
66 | public abstract function unescape($mode = self::NORMAL); |
||
67 | |||
68 | public abstract function uuDecode(); |
||
69 | |||
70 | public abstract function uuEncode(); |
||
71 | |||
72 | public function equals($str) |
||
79 | |||
80 | public abstract function isAscii(); |
||
81 | |||
82 | public abstract function isEmpty(); |
||
83 | |||
84 | protected static function testStringableObject($thing) |
||
94 | } |
||
95 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@return
doc comment to communicate to implementors of these methods what they are expected to return.