private function insertSegmentNotesForFile()
 {
     foreach ($this->projectStructure['notes'] as $internal_id => $v) {
         $entries = $v['entries'];
         $segments = $v['segment_ids'];
         // TODO: refactor using bulk insert
         foreach ($segments as $segment) {
             foreach ($entries as $note) {
                 Segments_SegmentNoteDao::insertRecord(array('internal_id' => $internal_id, 'id_segment' => $segment, 'note' => $note));
             }
         }
     }
 }
 private function prepareNotes($segments)
 {
     $start = $segments[0]['sid'];
     $last = end($segments);
     $stop = $last['sid'];
     $this->segment_notes = Segments_SegmentNoteDao::getAggregatedBySegmentIdInInterval($start, $stop);
 }
Exemple #3
0
 public function getNotes()
 {
     return $this->cachable(__FUNCTION__, $this->id, function ($id) {
         return Segments_SegmentNoteDao::getBySegmentId($id);
     });
 }