public function importsConst($const_name = NULL) {
    if (!$this->useConst) {
      return FALSE;
    }
    if ($const_name) {
      foreach ($this->getDeclarations() as $declaration) {
        if ($declaration->getName()->getPath() === $const_name) {
          return TRUE;
        }
      }
      return FALSE;
    }
    else {
      return TRUE;
    }
  }
public function importsConst($const_name = NULL) {
    if (!$this->useConst) {
      return FALSE;
    }
    if ($const_name) {
      foreach ($this->getDeclarations() as $declaration) {
        if ($declaration->getName()->getPath() === $const_name) {
          return TRUE;
        }
      }
      return FALSE;
    }
    else {
      return TRUE;
    }
  }
public function importsConst ( $ const_name = NULL ) { if ( ! $ this -> useConst ) { return FALSE ; } if ( $ const_name ) { foreach ( $ this -> getDeclarations ( ) as $ declaration ) { if ( $ declaration -> getName ( ) -> getPath ( ) === $ const_name ) { return TRUE ; } } return FALSE ; } else { return TRUE ; } }
Test whether use declaration imports a constant.

@param string|NULL $const_name
(Optional) Constant name to check if being imported by use statement.

@return bool
TRUE if this use declaration imports constant.
Test whether use declaration imports a constant .