src/Core/Core.php
public function run($path, $data = null)
    {
        $model = array();

        /**
         * first we have get the correct path
         * of the module name and method to execute
         */
        $callPath = $this->route($path);

        /**
         * once we have the module name and the
         * method name we build the payload and
         * data array.
         */
        $payload = array(
            $this->modules[$callPath->module],
            $callPath->method
        );

        if (isset($data)) {
            foreach ($data as $key => $argument) {
                $model[$key] = $argument;
            }
        }

        /**
         * here finally perform the actual call
         * to the module method requested.
         */
        return call_user_func_array($payload, $model);
    }
public function run($path, $data = null)
    {
        $model = array();

        /**
         * first we have get the correct path
         * of the module name and method to execute
         */
        $callPath = $this->route($path);

        /**
         * once we have the module name and the
         * method name we build the payload and
         * data array.
         */
        $payload = array(
            $this->modules[$callPath->module],
            $callPath->method
        );

        if (isset($data)) {
            foreach ($data as $key => $argument) {
                $model[$key] = $argument;
            }
        }

        /**
         * here finally perform the actual call
         * to the module method requested.
         */
        return call_user_func_array($payload, $model);
    }
public function run ( $ path , $ data = null ) { $ model = array ( ) ; /**
         * first we have get the correct path
         * of the module name and method to execute
         */ $ callPath = $ this -> route ( $ path ) ; /**
         * once we have the module name and the
         * method name we build the payload and
         * data array.
         */ $ payload = array ( $ this -> modules [ $ callPath -> module ] , $ callPath -> method ) ; if ( isset ( $ data ) ) { foreach ( $ data as $ key => $ argument ) { $ model [ $ key ] = $ argument ; } } /**
         * here finally perform the actual call
         * to the module method requested.
         */ return call_user_func_array ( $ payload , $ model ) ; }
Perform the main call of the module method
@param string $path
@param object|array|null $data
@return mixed
Perform the main call of the module method