(non-PHPdoc)
@see \Aztech\Phinject\Activator::createInstance()
165729
public function createInstance(Container $container, ArrayResolver $serviceConfig, $serviceName)
    {
        if ($serviceConfig->resolve('lazy', false) == false) {
            return $this->serviceBuilder->buildService($container, $serviceConfig, $serviceName);
        }

        if ($serviceConfig->resolve('class', false) == false) {
            throw new UnbuildableServiceException($serviceName . ' : "class" keyword is mandatory for lazy objects (interface or class name).');
        }

        $serviceBuilder = $this->serviceBuilder;
        $factory = new LazyLoadingValueHolderFactory();
        $invoker = new LazyActivationInvoker($container, $serviceBuilder, $serviceConfig, $serviceName);

        return $factory->createProxy($serviceConfig->resolve('class'), $invoker->createClosure());
    }
1345835
public function newInstance()
    {
        /** @noinspection PhpUnusedLocalVariableInspection */
        $name = "{$this->getMockNamespaceName()}\\{$this->getMockName()}";
        /** @noinspection PhpUnusedLocalVariableInspection */
        $code = $this->generateCode();
        /** @var $reflect \ReflectionClass */
        $reflect = eval("$code return new \\ReflectionClass('$name');");

        try {
            return $reflect->newInstanceArgs($this->constructorArgs);
        } catch (ReflectionException $e) {
            return $reflect->newInstance();
        }
    }
720008
public function create()
    {
        $instance = self::createDiscountCoupon($this);
        $this->setId($instance->getId());
        return $instance;
    }
111392
public function newInstance(string $class, array $args, BindInterface $bind)
    {
        $compiledClass = $this->compile($class, $bind);
        $instance = (new ReflectionClass($compiledClass))->newInstanceArgs($args);
        $instance->bindings = $bind->getBindings();

        return $instance;
    }
565415
public static function newInstance($class) {
		$className = str_replace(':', '\\', $class);
		$reflectedClass = new ReflectionClass($className);

		if ($reflectedClass->isInstantiable()) {
			$constructor = $reflectedClass->getConstructor();

			if ($constructor) {
				$parameters = $constructor->getParameters();
				$constructorParameters = array();

				foreach ($parameters as $parameter) {
					if ($parameter->getClass()) {
						$constructorParameters[] = self::newInstance($parameter->getClass()->getName());
					} else {
						$constructorParameters[] = $parameter->getDefaultValue();
					}
				}

				return $reflectedClass->newInstanceArgs($constructorParameters);
			} else {
				return $reflectedClass->newInstance();
			}

		} else {
			throw new Exception($class." is not instantiable Class");
		}
	}
822625
public function build(): InsertTextRequest
	{
		$instance = new InsertTextRequest();
		if ($this->text === null) {
			throw new BuilderException('Property [text] is required.');
		}
		$instance->text = $this->text;
		return $instance;
	}
371456
public function createInstance()
    {
        switch ($this->method) {
            case 'addBigIntegerColumn':
            case 'addBinaryColumn':
            case 'addBooleanColumn':
            case 'addDateColumn':
            case 'addDateTimeColumn':
            case 'addDecimalColumn':
            case 'addFloatColumn':
            case 'addIntegerColumn':
            case 'addSmallIntegerColumn':
            case 'addStringColumn':
            case 'addTextColumn':
            case 'addTimeColumn':
                $namespace = 'Rentgen\\Database\\Column\\';
                $class = $namespace . ltrim($this->method, 'add');
                $options = isset($this->params[1]) ? $this->params[1] : array();

                if ('addStringColumn' === $this->method && !isset($options['limit'])) {
                    $options['limit'] = 255;
                }
                $column = new $class($this->params[0], $options);
                break;
            case 'addCustomColumn':
                $options = isset($this->params[2]) ? $this->params[2] : [];
                $column = new CustomColumn($this->params[0], $this->params[1], $options);
                break;
            default:
                throw new \Exception(sprintf("Unsupported method " . $this->method));
        }

        if (isset($options['comment'])) {
            $column->setDescription($options['comment']);
        }

        return $column;
    }
332104
public function CloneInstance()
	{
		$result = new PrecedingNodeIterator();
		$result->AssignFrom( $this );
		$result->kind = $this->kind;
		return $result;
	}
1097192
public function build(): AddInspectedHeapObjectRequest
	{
		$instance = new AddInspectedHeapObjectRequest();
		if ($this->heapObjectId === null) {
			throw new BuilderException('Property [heapObjectId] is required.');
		}
		$instance->heapObjectId = $this->heapObjectId;
		return $instance;
	}
983844
public function create()
    {
        $instance = self::createStoreCreditPayment($this);
        $this->setId($instance->getId());
        return $instance;
    }
811004
public static function &getInstance()
    {
        $classname = get_called_class();
        if (!isset(self::$_instances[ $classname ])) {
            self::createInstance($classname, func_get_args());
        }
        $instance = self::$_instances[ $classname ];
        return $instance;
    }
440630
public function newInstance(
        string $createdByUserId,
        string $createdReason = Tracking::UNKNOWN_REASON
    ) {
        /** @var static $new */
        $new = parent::newInstance(
            $createdByUserId,
            $createdReason
        );

        // if no id, then it has not been save and can be returned
        if (empty($new->pluginInstanceId)) {
            return $new;
        }

        $new->pluginInstanceId = null;
        $new->previousEntity = null;

        return $new;
    }
126980
public function CloneInstance()
	{
		$result = new FollowingNodeIterator();
		$result->AssignFrom( $this );
		$result->kind = $this->kind;
		return $result;
	}
187538
public static function instance(): self
    {
        if (!self::$instance) {
            self::$instance = new self(
                InvocableInspector::instance(),
                FunctionSignatureInspector::instance(),
                FunctionHookGenerator::instance()
            );
        }

        return self::$instance;
    }
350552
public function create()
    {
        $instance = self::createCancelOperation($this);
        $this->setId($instance->getId());
        return $instance;
    }
1227257
function createInstance() {
    var instance = { publish: publish, subscribe: subscribe, close: close };
    instance.__defineGetter__("value", function () { return shared; });
    return instance;
  }
14331
public static function CreateInstance (
		$code = \MvcCore\IResponse::OK,
		$headers = [],
		$body = ''
	) {
		$responseClass = \MvcCore\Application::GetInstance()->GetResponseClass();
		return new $responseClass($code, $headers, $body);
	}