remove old readme
[atutor.git] / docs / mods / _core / imscc / classes / Weblinks.class.php
1 <?php
2 /****************************************************************/
3 /* ATutor                                                                                                               */
4 /****************************************************************/
5 /* Copyright (c) 2002-2009                                                                              */
6 /* Inclusive Design Institute                                   */
7 /* http://atutor.ca                                                                                             */
8 /*                                                              */
9 /* This program is free software. You can redistribute it and/or*/
10 /* modify it under the terms of the GNU General Public License  */
11 /* as published by the Free Software Foundation.                                */
12 /****************************************************************/
13 // $Id$
14
15 /**
16  * A class for Weblinks object
17  * based on:
18  *  http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_5/imswl_v1p0_localised.xsd
19  */
20
21 class Weblinks {
22         //global variables
23         var $title      = '';
24         var $url        = array();      //prefs
25
26
27         /**
28          * Constructor
29          * For now, uses only title and URL
30          */
31         function Weblinks($title, $url){
32                 $this->title = $title;
33                 $this->url['href'] = $url;
34                 $this->setUrlPrefs();   //set defaults values
35         }
36
37         /**
38          * Set Url prefs
39          * @param       string          resembles HTML target attribute, [_self, _blank, _parent, _top, <name>], default '_self'
40          * @param       string          browser window settings
41          */
42         function setUrlPrefs($target='_self', $window_features=''){
43                 $this->url['target'] = $target;
44                 $this->url['window_features'] = $window_features;
45         }
46
47
48         /**
49          * Return the title of this weblink
50          * @return      string
51          */
52         function getTitle(){
53                 return $this->title;
54         }
55
56
57         /**
58          * Return the URL array of this weblink
59          * @return      mixed
60          */
61         function getUrl(){
62                 return $this->url;
63         }
64 }
65 ?>