1: <?php
2:
3: /**
4: * Avisota newsletter and mailing system
5: *
6: * PHP Version 5.3
7: *
8: * @copyright bit3 UG 2013
9: * @author Tristan Lins <tristan.lins@bit3.de>
10: * @package avisota-core
11: * @license LGPL-3.0+
12: * @link http://avisota.org
13: */
14:
15: namespace Avisota\Recipient;
16:
17: /**
18: * The basic recipient interface.
19: *
20: * @package avisota-core
21: */
22: interface RecipientInterface
23: {
24: /**
25: * Get the recipient email address.
26: *
27: * @return string
28: */
29: public function getEmail();
30:
31: /**
32: * Check if this recipient has personal data.
33: *
34: * @return bool
35: */
36: public function hasDetails();
37:
38: /**
39: * Get a single personal data field value.
40: * Return null if the field does not exists.
41: *
42: * @param string $name
43: *
44: * @return mixed
45: */
46: public function get($name);
47:
48: /**
49: * Get all personal data values as associative array.
50: *
51: * The personal data must have a key 'email', that contains the email address.
52: * <pre>
53: * array (
54: * 'email' => '...',
55: * ...
56: * )
57: * </pre>
58: *
59: * @return array
60: */
61: public function getDetails();
62:
63: /**
64: * Get all personal data keys.
65: *
66: * The keys must contain 'email'.
67: * <pre>
68: * array (
69: * 'email',
70: * ...
71: * )
72: * </pre>
73: *
74: * @return array
75: */
76: public function getKeys();
77: }