Creates new instance of current class type
Expect a subclass of \PerrysLambda\ArrayBase
@return \PerrysLambda\ArrayBase
771543
public function newInstance($data=null)
    {
        $class = $this->getClassName();
        $conv = $this->newConverterInstance();

        if(is_null($data))
        {
            $data = array();
        }

        if($conv instanceof IListConverter)
        {
            $data = $conv;
        }

        $o = new $class($data);
        if($conv instanceof IBaseConverter)
        {
            $o->setConverter($conv);
        }

        return $o;
    }
748825
public function create()
    {
        $entityClass = $this->getEntityName();

        $reflection = new \ReflectionClass($entityClass);

        if ($reflection->isAbstract()) {
            throw RuntimeException::createAbstract($entityClass);
        }

        return new $entityClass();
    }
749265
public function createNew()
    {
        $resource = $this->factory->createNew();

        if (!$resource instanceof TranslatableInterface) {
            throw new UnexpectedTypeException($resource, TranslatableInterface::class);
        }

        $resource->setCurrentLocale($this->localeProvider->getDefaultLocaleCode());
        $resource->setFallbackLocale($this->localeProvider->getDefaultLocaleCode());

        return $resource;
    }
47478
public function newInstance($className, array $args = array())
    {
        // create and return a new instance
        $reflectionClass = $this->newReflectionClass($className);
        return $reflectionClass->newInstanceArgs($args);
    }
676030
public static function newInstance()
    {
        $config = self::create();

        $config->username = 'null';
        $config->password = 'null';
        $config->credentials = ['null', 'null'];
        $config->bindtoInterface = 'null';
        $config->timeout = 5;

        return $config;
    }
233961
public function make()
    {
        if (($params = $this->canBuild())) {
            $reflectionClass = new \ReflectionClass($this->className);
            $object = $reflectionClass->newInstanceArgs(is_array($params) ? $params : []);
            /**
             * Reset the object by removing default values used for typehinting
             * Then add our dependancies
             */
            $this->resetObject($object);
            foreach ($this->params as $key => $value) {
                $object->with($value, (is_numeric($key) ? null : $key));
            }
            $object->freeze();
            return $object;
        }
        return $this;
    }
1373746
public function createInstance()
    {
        if (is_null($this->entityName)) {
            $class = new \ReflectionClass($this->originalEntityName);
        } else {
            $class = new \ReflectionClass($this->entityName);
        }

        return $class->newInstanceArgs();
    }
1044197
public function build(): RequestDatabaseRequest
	{
		$instance = new RequestDatabaseRequest();
		if ($this->securityOrigin === null) {
			throw new BuilderException('Property [securityOrigin] is required.');
		}
		$instance->securityOrigin = $this->securityOrigin;
		if ($this->databaseName === null) {
			throw new BuilderException('Property [databaseName] is required.');
		}
		$instance->databaseName = $this->databaseName;
		return $instance;
	}
641664
public function createObjectType() : ObjectConstructorCallbackDefiner
    {
        return new ObjectConstructorCallbackDefiner($this->class, function (callable $typeCallback) {
            $this->createObjectCallback = function (array $input) use ($typeCallback) {
                $className = $this->class->getClassName();

                /** @var TypedObject|string $instanceOrType */
                $instanceOrType = $typeCallback($input);

                if (is_string($instanceOrType)) {
                    if (class_exists($instanceOrType) && is_a($instanceOrType, $className, true)) {
                        $instanceOrType = $instanceOrType::definition()->newCleanInstance();
                    }
                }

                if (!($instanceOrType instanceof $className)) {
                    throw InvalidReturnValueException::format(
                        'Invalid create object callback return value: expecting class compatible with %s, %s given',
                        $className, is_string($instanceOrType) ? $instanceOrType : Debug::getType($instanceOrType)
                    );
                }

                return $instanceOrType;
            };
        });
    }
136407
public static function instance()
    {
        if (self::$_instance === null) {
            $type = ArrayHelper::getValue(Yii::$app->params, 'mdm.admin.configs', []);
            if (is_array($type) && !isset($type['class'])) {
                $type['class'] = static::className();
            }

            return self::$_instance = Yii::createObject($type);
        }

        return self::$_instance;
    }
644620
public function build(): RequestDataRequest
	{
		$instance = new RequestDataRequest();
		if ($this->securityOrigin === null) {
			throw new BuilderException('Property [securityOrigin] is required.');
		}
		$instance->securityOrigin = $this->securityOrigin;
		if ($this->databaseName === null) {
			throw new BuilderException('Property [databaseName] is required.');
		}
		$instance->databaseName = $this->databaseName;
		if ($this->objectStoreName === null) {
			throw new BuilderException('Property [objectStoreName] is required.');
		}
		$instance->objectStoreName = $this->objectStoreName;
		if ($this->indexName === null) {
			throw new BuilderException('Property [indexName] is required.');
		}
		$instance->indexName = $this->indexName;
		if ($this->skipCount === null) {
			throw new BuilderException('Property [skipCount] is required.');
		}
		$instance->skipCount = $this->skipCount;
		if ($this->pageSize === null) {
			throw new BuilderException('Property [pageSize] is required.');
		}
		$instance->pageSize = $this->pageSize;
		$instance->keyRange = $this->keyRange;
		return $instance;
	}
47204
public function create()
    {
        $instance = self::createVariant($this);
        $this->setId($instance->getId());
        return $instance;
    }
384973
private function newExpr() {
    $node = new NewNode();
    $this->mustMatch(T_NEW, $node);
    $node->addChild($this->classNameReference(), 'className');
    if ($this->currentType === '(') {
      $this->functionCallParameterList($node);
    }
    return $node;
  }
636048
public function newInstance($className, array $args = array())
    {

        // load the reflection data for the passed class name
        $reflectionClass = $this->getReflectionClass($className);

        // query whether or not the class has a constructor
        if ($reflectionClass->hasMethod($methodName = '__construct') &&
            $reflectionClass->getMethod($methodName)->getParameters() &&
            sizeof($args) > 0
        ) {
            return $reflectionClass->newInstanceArgs($args);
        }

        // return the instance without calling the constructor
        return $reflectionClass->newInstance();
    }
447267
public function asSequence(): Constructed\Sequence
    {
        if (!$this->_element instanceof Constructed\Sequence) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_SEQUENCE));
        }
        return $this->_element;
    }
332104
public function CloneInstance()
	{
		$result = new PrecedingNodeIterator();
		$result->AssignFrom( $this );
		$result->kind = $this->kind;
		return $result;
	}
845433
public function new(array $record = [])
    {
        $record = $this->prepareBaseRecord($record);

        return $this->cleanClone()->addPristineRecord($record, ['isCasted' => true])->markAsNew();
    }