AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface::getType PHP Method

getType() public method

Returns the container's class name.
public getType ( ) : string
return string The container's class name
    public function getType();

Usage Example

 /**
  * Factory method to create a new container instance.
  *
  * @param \AppserverIo\Appserver\Core\Interfaces\ApplicationServerInterface $applicationServer The application instance to register the class loader with
  * @param \AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface       $configuration     The class loader configuration
  *
  * @return void
  */
 public static function factory(ApplicationServerInterface $applicationServer, ContainerNodeInterface $configuration)
 {
     // create a new reflection class instance
     $reflectionClass = new \ReflectionClass($configuration->getType());
     // initialize the container configuration with the base directory and pass it to the thread
     $params = array($applicationServer->getInitialContext(), $applicationServer->getNamingDirectory(), $configuration);
     // create and append the thread instance to the internal array
     return $reflectionClass->newInstanceArgs($params);
 }
All Usage Examples Of AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface::getType