diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2012-07-27 07:47:30 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2012-07-27 07:47:30 +0200 |
| commit | 822f3d0bb9ca915fd853fa2fa737bffdc8e58b40 (patch) | |
| tree | ac9fd562c1d71dfe1cf55fa94f074140b7805586 | |
| parent | b618b8360a69ada6b0ca412d5d15d7ec1edb9e82 (diff) | |
| download | auerswald-callnotifier-822f3d0bb9ca915fd853fa2fa737bffdc8e58b40.tar.gz auerswald-callnotifier-822f3d0bb9ca915fd853fa2fa737bffdc8e58b40.zip | |
use integer codes, not strings
| -rw-r--r-- | src/callnotifier/EDSS1/Message.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/callnotifier/EDSS1/Message.php b/src/callnotifier/EDSS1/Message.php index 421df79..0b479ec 100644 --- a/src/callnotifier/EDSS1/Message.php +++ b/src/callnotifier/EDSS1/Message.php @@ -3,16 +3,16 @@ namespace callnotifier; class EDSS1_Message { - const ALERTING = "\x01"; - const CALL_PROCEEDING = "\x02"; - const SETUP = "\x05"; - const CONNECT = "\x07"; - const SETUP_ACKNOWLEDGE = "\x0D"; - const DISCONNECT = "\x45"; - const RELEASE = "\x4D"; - const RELEASE_COMPLETE = "\x5A"; - const FACILITY = "\x62"; - const INFORMATION = "\x7B"; + const ALERTING = 0x01; + const CALL_PROCEEDING = 0x02; + const SETUP = 0x05; + const CONNECT = 0x07; + const SETUP_ACKNOWLEDGE = 0x0D; + const DISCONNECT = 0x45; + const RELEASE = 0x4D; + const RELEASE_COMPLETE = 0x5A; + const FACILITY = 0x62; + const INFORMATION = 0x7B; /** * Message type, see the class constants @@ -86,7 +86,7 @@ class EDSS1_Message { $rc = new \ReflectionClass($this); foreach ($rc->getConstants() as $name => $value) { - if (ord($value) == $this->type) { + if ($value == $this->type) { return $name; } } |
