Notes can be saved, retrieved, and deleted. They are uniquely identified by a numeric ID value.
Example 820. Working With Notes
<?php
$simpy = new Zend_Service_Simpy('yourusername', 'yourpassword');
/* Save a note */
$simpy->saveNote(
'Test Note', // Title
'test,note', // Tags
'This is a test note.' // Description
);
/* Overwrite an existing note */
$simpy->saveNote(
'Updated Test Note', // Title
'test,note,updated', // Tags
'This is an updated test note.', // Description
$note->getId() // Unique identifier
);
/* Search for the 10 most recently added notes */
$noteSet = $simpy->getNotes(null, 10);
/* Display the notes */
foreach ($noteSet as $note) {
echo '<p>';
echo $note->getTitle();
echo '<br />';
echo $note->getDescription();
echo '<br >';
echo $note->getTags();
echo '</p>';
}
/* Search for all notes with 'PHP' in the title */
$noteSet = $simpy->getNotes('title:PHP');
/* Search for all notes with 'PHP' in the title and
without 'framework' in the description */
$noteSet = $simpy->getNotes('+title:PHP -description:framework');
/* Delete a note */
$simpy->deleteNote($note->getId());




