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->_uri = $xpath->evaluate('/note/uri')->item(0)->nodeValue; $this->_id = substr($this->_uri, strrpos($this->_uri, '=') + 1); $this->_modDate = trim($xpath->evaluate('/note/modDate')->item(0)->nodeValue); $this->_addDate = trim($xpath->evaluate('/note/addDate')->item(0)->nodeValue); $this->_title = $xpath->evaluate('/note/title')->item(0)->nodeValue; $this->_description = $xpath->evaluate('/note/description')->item(0)->nodeValue; $list = $xpath->query('/note/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 note * * @see ACCESSTYPE_PRIVATE * @see ACCESSTYPE_PUBLIC * @return string */ public function getAccessType() { return $this->_accessType; } /** * Returns the ID of the note * * @return int */ public function getId() { return $this->_id; } /** * Returns the URI of the note * * @return string */ public function getUri() { return $this->_uri; } /** * Returns the date of the last modification made to the note * * @return string */ public function getModDate() { return $this->_modDate; } /** * Returns the date the note was added * * @return string */ public function getAddDate() { return $this->_addDate; } /** * Returns the title assigned to the note * * @return string */ public function getTitle() { return $this->_title; } /** * Returns the tags assigned to the note * * @return array */ public function getTags() { return $this->_tags; } /** * Returns the description assigned to the note * * @return string */ public function getDescription() { return $this->_description; } }