Http/Drops/Action.php
protected function getCallbackFromReference($reference): callable
    {
        $this->reference = $reference;
        if(is_callable($reference)) {
            if(!is_string($reference)) {
                $callback = $reference;
            } else {
                $parts = explode("::", $reference);
                $callback = [new $parts[0](), $parts[1]];
            }
        } else {
            $callback = function () use ($reference) {
                new RegularResponse($reference);
            };
        }

        return $callback;
    }
protected function getCallbackFromReference($reference): callable
    {
        $this->reference = $reference;
        if(is_callable($reference)) {
            if(!is_string($reference)) {
                $callback = $reference;
            } else {
                $parts = explode("::", $reference);
                $callback = [new $parts[0](), $parts[1]];
            }
        } else {
            $callback = function () use ($reference) {
                new RegularResponse($reference);
            };
        }

        return $callback;
    }
protected function getCallbackFromReference ( $ reference ) : callable { $ this -> reference = $ reference ; if ( is_callable ( $ reference ) ) { if ( ! is_string ( $ reference ) ) { $ callback = $ reference ; } else { $ parts = explode ( "::" , $ reference ) ; $ callback = [ new $ parts [ 0 ] ( ) , $ parts [ 1 ] ] ; } } else { $ callback = function ( ) use ( $ reference ) { new RegularResponse ( $ reference ) ; } ; } return $ callback ; }
Call this when action calling, to make Controller in a time
@param $reference
@return callable
Call this when action calling to make Controller in a time