Rev 360 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 360 | Rev 386 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | public function nodeId($with_ns=true) { |
54 | public function nodeId($with_ns=true) { |
55 | return $with_ns ? 'gs1:'.$this->number : $this->number; |
55 | return $with_ns ? 'gs1:'.$this->number : $this->number; |
56 | } |
56 | } |
57 | 57 | ||
58 | public function addString($str) { |
58 | public function addString($str) { |
- | 59 | $m = array(); |
|
59 | if (!preg_match('@^\\d+$@', $str, $m)) { |
60 | if (!preg_match('@^\\d+$@', $str, $m)) { |
60 | throw new OIDplusException(_L('GS1 value needs to be numeric')); |
61 | throw new OIDplusException(_L('GS1 value needs to be numeric')); |
61 | } |
62 | } |
62 | 63 | ||
63 | return $this->nodeId() . $str; |
64 | return $this->nodeId() . $str; |