src/BfwController.php
protected function runObject()
    {
        $targetInfos = $this->ctrlRouterInfos->target;
        
        if (
            !is_array($targetInfos) ||
            (is_array($targetInfos) && count($targetInfos) !== 2)
        ) {
            throw new Exception(
                'The route target should be an array with the class name '
                .'(first value) and the method name (second value).',
                self::ERR_RUN_OBJECT_MISSING_DATAS_INTO_TARGET
            );
        }
        
        $class  = $targetInfos[0];
        $method = $targetInfos[1];
        
        if (!class_exists($class)) {
            throw new Exception(
                'Class '.$class.' not found',
                self::ERR_RUN_OBJECT_CLASS_NOT_FOUND
            );
        }
        
        $classInstance = new $class;
        if (!method_exists($classInstance, $method)) {
            throw new Exception(
                'Method '.$method.' not found in class '.$class,
                self::ERR_RUN_OBJECT_METHOD_NOT_FOUND
            );
        }
        
        $classInstance->{$method}();
    }
protected function runObject()
    {
        $targetInfos = $this->ctrlRouterInfos->target;
        
        if (
            !is_array($targetInfos) ||
            (is_array($targetInfos) && count($targetInfos) !== 2)
        ) {
            throw new Exception(
                'The route target should be an array with the class name '
                .'(first value) and the method name (second value).',
                self::ERR_RUN_OBJECT_MISSING_DATAS_INTO_TARGET
            );
        }
        
        $class  = $targetInfos[0];
        $method = $targetInfos[1];
        
        if (!class_exists($class)) {
            throw new Exception(
                'Class '.$class.' not found',
                self::ERR_RUN_OBJECT_CLASS_NOT_FOUND
            );
        }
        
        $classInstance = new $class;
        if (!method_exists($classInstance, $method)) {
            throw new Exception(
                'Method '.$method.' not found in class '.$class,
                self::ERR_RUN_OBJECT_METHOD_NOT_FOUND
            );
        }
        
        $classInstance->{$method}();
    }
protected function runObject ( ) { $ targetInfos = $ this -> ctrlRouterInfos -> target ; if ( ! is_array ( $ targetInfos ) || ( is_array ( $ targetInfos ) && count ( $ targetInfos ) !== 2 ) ) { throw new Exception ( 'The route target should be an array with the class name ' . '(first value) and the method name (second value).' , self :: ERR_RUN_OBJECT_MISSING_DATAS_INTO_TARGET ) ; } $ class = $ targetInfos [ 0 ] ; $ method = $ targetInfos [ 1 ] ; if ( ! class_exists ( $ class ) ) { throw new Exception ( 'Class ' . $ class . ' not found' , self :: ERR_RUN_OBJECT_CLASS_NOT_FOUND ) ; } $ classInstance = new $ class ; if ( ! method_exists ( $ classInstance , $ method ) ) { throw new Exception ( 'Method ' . $ method . ' not found in class ' . $ class , self :: ERR_RUN_OBJECT_METHOD_NOT_FOUND ) ; } $ classInstance -> { $ method } ( ) ; }
Call controller when is an object.

@return void
Call controller when is an object .