public function getAllProperties($types = self::FULL_HIERARCHY) {
    if ($types & self::WITH_OWN) {
      $properties = clone $this->properties;
    } else {
      $properties = new GObjectCollection(array());
    }
    
    if ($types & self::WITH_PARENTS && $this->getParent() != NULL) {
      // treat duplicates (aka: overriden properties):
      $parentTypes = $types | self::WITH_OWN;
      foreach ($this->getParent()->getAllProperties($parentTypes) as $property) {
        if (!$properties->has($property)) {
          $properties->add($property);
        }
      }
    }
    
    return $properties->toArray();
  }