public function matchTags(array $tags=[], $matchMode='all') {
    $numGivenTags = sizeof($tags);
    if (sizeof($numGivenTags) == 0) {
      return true;
    }
    $result = true;
    $diff = sizeof(array_diff($tags, $this->tags));
    switch ($matchMode) {
      case 'all':
        $result = ($diff == 0);
        break;
      case 'none':
        $result = ($diff == $numGivenTags);
        break;
      case 'any':
        $result = ($diff < $numGivenTags);
        break;
    }
    return $result;
  }