node from a parsed response from * a GetLinks operation * @return void */ public function __construct($node) { $this->_accessType = $node->attributes->getNamedItem('accessType')->nodeValue; $doc = new DOMDocument(); $doc->appendChild($doc->importNode($node, true)); $xpath = new DOMXPath($doc); $this->_url = $xpath->evaluate('/link/url')->item(0)->nodeValue; $this->_modDate = $xpath->evaluate('/link/modDate')->item(0)->nodeValue; $this->_addDate = $xpath->evaluate('/link/addDate')->item(0)->nodeValue; $this->_title = $xpath->evaluate('/link/title')->item(0)->nodeValue; $this->_nickname = $xpath->evaluate('/link/nickname')->item(0)->nodeValue; $this->_note = $xpath->evaluate('/link/note')->item(0)->nodeValue; $list = $xpath->query('/link/tags/tag'); $this->_tags = array(); for ($x = 0; $x < $list->length; $x++) { $this->_tags[$x] = $list->item($x)->nodeValue; } } /** * Returns the access type assigned to the link * * @see ACCESSTYPE_PRIVATE * @see ACCESSTYPE_PUBLIC * @return string */ public function getAccessType() { return $this->_accessType; } /** * Returns the URL of the link * * @return string */ public function getUrl() { return $this->_url; } /** * Returns the date of the last modification made to the link * * @return string */ public function getModDate() { return $this->_modDate; } /** * Returns the date the link was added * * @return string */ public function getAddDate() { return $this->_addDate; } /** * Returns the title assigned to the link * * @return string */ public function getTitle() { return $this->_title; } /** * Returns the nickname assigned to the link * * @return string */ public function getNickname() { return $this->_nickname; } /** * Returns the tags assigned to the link * * @return array */ public function getTags() { return $this->_tags; } /** * Returns the note assigned to the link * * @return string */ public function getNote() { return $this->_note; } }