public function getImports($types = 0x000000) {
    $imports = clone $this->ownImports;
    
    // props
    foreach ($this->getProperties() as $property) {
      if ($property->getType() instanceof ObjectType && $property->getType()->hasClass()) {
        $imports->add(new GClass($property->getType()->getClassFQN())); // translate back to GClass (because this can be a simple ClassInterface - class)
      }
    }
    
    // methods
    foreach ($this->getMethods() as $method) {
      foreach ($method->getParameters() as $parameter) {
        if ($parameter->getType() instanceof ObjectType && $parameter->getType()->hasClass()) {
          $imports->add(new GClass($parameter->getType()->getClassFQN())); // translate back
        }
      }
    }
    
    if ($types & self::WITH_EXTENDS && $this->parentClass != NULL) {
      $imports->add($this->parentClass);
    }
    
    // interfaces
    if ($types & self::WITH_INTERFACE) {
      foreach ($this->getInterfaces() as $interface) {
        $imports->add($interface);
      }
    }
    
    return $imports;
  }
public function getImports($types = 0x000000) {
    $imports = clone $this->ownImports;
    
    // props
    foreach ($this->getProperties() as $property) {
      if ($property->getType() instanceof ObjectType && $property->getType()->hasClass()) {
        $imports->add(new GClass($property->getType()->getClassFQN())); // translate back to GClass (because this can be a simple ClassInterface - class)
      }
    }
    
    // methods
    foreach ($this->getMethods() as $method) {
      foreach ($method->getParameters() as $parameter) {
        if ($parameter->getType() instanceof ObjectType && $parameter->getType()->hasClass()) {
          $imports->add(new GClass($parameter->getType()->getClassFQN())); // translate back
        }
      }
    }
    
    if ($types & self::WITH_EXTENDS && $this->parentClass != NULL) {
      $imports->add($this->parentClass);
    }
    
    // interfaces
    if ($types & self::WITH_INTERFACE) {
      foreach ($this->getInterfaces() as $interface) {
        $imports->add($interface);
      }
    }
    
    return $imports;
  }
public function getImports ( $ types = 0x000000 ) { $ imports = clone $ this -> ownImports ; // props foreach ( $ this -> getProperties ( ) as $ property ) { if ( $ property -> getType ( ) instanceof ObjectType && $ property -> getType ( ) -> hasClass ( ) ) { $ imports -> add ( new GClass ( $ property -> getType ( ) -> getClassFQN ( ) ) ) ; // translate back to GClass (because this can be a simple ClassInterface - class) } } // methods foreach ( $ this -> getMethods ( ) as $ method ) { foreach ( $ method -> getParameters ( ) as $ parameter ) { if ( $ parameter -> getType ( ) instanceof ObjectType && $ parameter -> getType ( ) -> hasClass ( ) ) { $ imports -> add ( new GClass ( $ parameter -> getType ( ) -> getClassFQN ( ) ) ) ; // translate back } } } if ( $ types & self :: WITH_EXTENDS && $ this -> parentClass != NULL ) { $ imports -> add ( $ this -> parentClass ) ; } // interfaces if ( $ types & self :: WITH_INTERFACE ) { foreach ( $ this -> getInterfaces ( ) as $ interface ) { $ imports -> add ( $ interface ) ; } } return $ imports ; }
Returns the Imports which are used in the code of the class

These are all needed exports to make the code compile

@return Webforge\Code\Generate\Imports
Returns the Imports which are used in the code of the class