Ejemplo n.º 1
0
 public function __construct($filter, $start, $count)
 {
     $cache = new Cache('note_list', false);
     if (!($metaList = $cache->fetch(compact('filter', 'start', 'count')))) {
         $metaList = Evernote::_noteStore()->findNotesMetadata(AUTH_TOKEN, $filter, $start, $count, new EDAM\NoteStore\NotesMetadataResultSpec());
         $cache->store($metaList);
     }
     $this->_metaList = $metaList;
     $this->total = $metaList->totalNotes;
 }
Ejemplo n.º 2
0
 public static function _noteStore()
 {
     if (self::$_noteStore) {
         return self::$_noteStore;
     }
     $part = parse_url(self::_userStore()->getNoteStoreUrl(AUTH_TOKEN));
     $noteStoreHttpClient = new THttpClient(NOTESTORE_HOST, NOTESTORE_PORT, $part['path'], NOTESTORE_PROTOCOL);
     $noteStoreProtocol = new TBinaryProtocol($noteStoreHttpClient);
     return self::$_noteStore = new NoteStoreClient($noteStoreProtocol, $noteStoreProtocol);
 }
Ejemplo n.º 3
0
 public function __construct($guid = null)
 {
     $this->tags = new Types\Set();
     $this->likers = new Types\Set();
     parent::__construct($guid);
 }