code: public function addConstants(Event $abs)
      {
          if (!$this->abstracter->getCfg('collectConstants')) {
              return;
          }
          $reflector = $abs['reflector'];
          $constants = $reflector->getConstants();
          while ($reflector = $reflector->getParentClass()) {
              $constants = \array_merge($reflector->getConstants(), $constants);
          }
          if ($this->abstracter->getCfg('objectSort') == 'name') {
              \ksort($constants);
          }
          $abs['constants'] = $constants;
      }
docs: Get object's constants
  
  @param Event $abs Abstraction event object
  
  @return void