1 | <?php |
||
8 | class ExternalURL extends DBVarchar |
||
9 | { |
||
10 | private static $casting = array( |
||
|
|||
11 | "Domain" => "ExternalURL", |
||
12 | "URL" => "ExternalURL" |
||
13 | ); |
||
14 | |||
15 | /** |
||
16 | * 2083 is the lowest common denominator when it comes to url lengths. |
||
17 | */ |
||
18 | 4 | public function __construct($name = null, $size = 2083, $options = array()) |
|
22 | |||
23 | /** |
||
24 | * Remove ugly parts of a url to make it nice |
||
25 | */ |
||
26 | 1 | public function Nice() |
|
37 | |||
38 | /** |
||
39 | * Get just the domain of the url. |
||
40 | */ |
||
41 | 1 | public function Domain() |
|
47 | |||
48 | /** |
||
49 | * Remove the www subdomain, if present. |
||
50 | */ |
||
51 | public function NoWWW() |
||
55 | |||
56 | /** |
||
57 | * Scaffold the ExternalURLField for this ExternalURL |
||
58 | */ |
||
59 | 1 | public function scaffoldFormField($title = null, $params = null) |
|
66 | |||
67 | 1 | public function forTemplate() |
|
73 | } |
||
74 |