1 | <?php |
||
21 | class Subdomain extends DomainObject |
||
22 | { |
||
23 | /** |
||
24 | * Construct the object. |
||
25 | * |
||
26 | * @param string $prefix The domain name |
||
27 | * @param Domain $domain The containing domain |
||
28 | */ |
||
29 | public function __construct($prefix, Domain $domain) |
||
33 | |||
34 | /** |
||
35 | * Creates a new subdomain. |
||
36 | * |
||
37 | * @param Domain $domain Parent domain |
||
38 | * @param string $prefix Prefix of the subdomain |
||
39 | * @return Subdomain The newly created object |
||
40 | */ |
||
41 | public static function create(Domain $domain, $prefix) |
||
46 | |||
47 | /** |
||
48 | * Deletes the subdomain. |
||
49 | * |
||
50 | * @param bool $deleteContents Whether to delete all directory contents as well |
||
51 | */ |
||
52 | public function delete($deleteContents = true) |
||
59 | |||
60 | /** |
||
61 | * Returns the full domain name for the subdomain. |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | public function getDomainName() |
||
69 | |||
70 | /** |
||
71 | * Returns the full domain name for the subdomain. |
||
72 | * |
||
73 | * @return string |
||
74 | */ |
||
75 | public function getBaseDomainName() |
||
79 | |||
80 | /** |
||
81 | * Returns the prefix of the subdomain. |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | public function getPrefix() |
||
89 | |||
90 | /** |
||
91 | * Allows the class to be used as a string representing the full domain name. |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | public function __toString() |
||
99 | } |
||
100 |