public function getRegisteredObject()
    {
        if($this->registeredObject == null)
        {
            $di = jaxon()->di();
            // Use the Reflection class to get the parameters of the constructor
            if(($constructor = $this->reflectionClass->getConstructor()) != null)
            {
                $parameters = $constructor->getParameters();
                $parameterInstances = [];
                foreach($parameters as $parameter)
                {
                    // Get the parameter instance from the DI
                    $parameterInstances[] = $di->get($parameter->getClass()->getName());
                }
                $this->registeredObject = $this->reflectionClass->newInstanceArgs($parameterInstances);
            }
            else
            {
                $this->registeredObject = $this->reflectionClass->newInstance();
            }
        }
        return $this->registeredObject;
    }
public function getRegisteredObject()
    {
        if($this->registeredObject == null)
        {
            $di = jaxon()->di();
            // Use the Reflection class to get the parameters of the constructor
            if(($constructor = $this->reflectionClass->getConstructor()) != null)
            {
                $parameters = $constructor->getParameters();
                $parameterInstances = [];
                foreach($parameters as $parameter)
                {
                    // Get the parameter instance from the DI
                    $parameterInstances[] = $di->get($parameter->getClass()->getName());
                }
                $this->registeredObject = $this->reflectionClass->newInstanceArgs($parameterInstances);
            }
            else
            {
                $this->registeredObject = $this->reflectionClass->newInstance();
            }
        }
        return $this->registeredObject;
    }
public function getRegisteredObject ( ) { if ( $ this -> registeredObject == null ) { $ di = jaxon ( ) -> di ( ) ; // Use the Reflection class to get the parameters of the constructor if ( ( $ constructor = $ this -> reflectionClass -> getConstructor ( ) ) != null ) { $ parameters = $ constructor -> getParameters ( ) ; $ parameterInstances = [ ] ; foreach ( $ parameters as $ parameter ) { // Get the parameter instance from the DI $ parameterInstances [ ] = $ di -> get ( $ parameter -> getClass ( ) -> getName ( ) ) ; } $ this -> registeredObject = $ this -> reflectionClass -> newInstanceArgs ( $ parameterInstances ) ; } else { $ this -> registeredObject = $ this -> reflectionClass -> newInstance ( ) ; } } return $ this -> registeredObject ; }
Return the registered callable object

@return object
Return the registered callable object