forked from MARCspec/php-marc-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComparisonStringInterface.php
More file actions
executable file
·72 lines (66 loc) · 1.39 KB
/
ComparisonStringInterface.php
File metadata and controls
executable file
·72 lines (66 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/**
* MARCspec is the specification of a reference, encoded as string, to a set of data
* from within a MARC record.
*
* @author Carsten Klee <mailme.klee@yahoo.de>
* @copyright For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CK\MARCspec;
/**
* MARCspec comparison string interface.
*/
interface ComparisonStringInterface
{
/**
* Constructor for ComparisonString.
*
* @api
*
* @param string $raw The escaped comparison string
*/
public function __construct($raw);
/**
* Get unescaped comparable string.
*
* @api
*
* @return string The comparable string
*/
public function getComparable();
/**
* Get raw escaped string.
*
* @api
*
* @return string The escaped string
*/
public function getRaw();
/**
* Escape a comparison string.
*
* @api
*
* @param string $arg The unescaped string
*
* @return string The escaped string
*/
public static function escape($arg);
/**
* encodes ComparisonString as string.
*
* @api
*
* @return string
*/
public function __toString();
/**
* Serialize ComparisonString as JSON.
*
* @api
*
* @return array
*/
public function jsonSerialize();
} // EOI