code: public function getTypeNames($flags = false)
      {
          if ($flags === false) {
              $flags = self::FLAG_ALL;
          }
  
          $result = array();
          foreach (array_keys($this->typeFactories) as $name) {
              if (!$this->attributeTypeMatchesFlags($name, $flags)) {
                  continue;
              }
  
              $result[] = $name;
          }
  
          return $result;
      }
docs: {@inheritdoc}