src/Framework.php
public function createNew($className)
    {
        $constructArguments = func_get_args();
        $object = $this->_createNew( ...$constructArguments);
        
        $traits = class_uses($object);

        if (isset($traits[Framework::class]) == true) {
            $object->setContainer($this->container);
        }

        return $object;
    }
public function createNew($className)
    {
        $constructArguments = func_get_args();
        $object = $this->_createNew( ...$constructArguments);
        
        $traits = class_uses($object);

        if (isset($traits[Framework::class]) == true) {
            $object->setContainer($this->container);
        }

        return $object;
    }
public function createNew ( $ className ) { $ constructArguments = func_get_args ( ) ; $ object = $ this -> _createNew ( ... $ constructArguments ) ; $ traits = class_uses ( $ object ) ; if ( isset ( $ traits [ Framework :: class ] ) == true ) { $ object -> setContainer ( $ this -> container ) ; } return $ object ; }
Create a new instance of a given class

@param string $className The class to create

@return object The new class
Create a new instance of a given class