src/Traits/tMixin.php
function getMethod($methodName)
    {
        if (!$this->hasMethod($methodName))
            throw new \Exception(sprintf(
                'Method (%s) not found.'
                , $methodName
            ));

        if (isset($this->_t__methods[$methodName])) {
            ## from bind closure
            $methodCallable = $this->_t__methods[$methodName];
        } else {
            $bindTo = $this->getBindTo();
            $methodCallable = function() use($methodName, $bindTo) {
                return call_user_func_array([$bindTo, $methodName], func_get_args());
            };
        }

        ## bind it into latest bind object
        $methodCallable = \Closure::bind(
            $methodCallable
            , $this->getBindTo()
            , get_class($this->getBindTo())
        );

        return $methodCallable;
    }
function getMethod($methodName)
    {
        if (!$this->hasMethod($methodName))
            throw new \Exception(sprintf(
                'Method (%s) not found.'
                , $methodName
            ));

        if (isset($this->_t__methods[$methodName])) {
            ## from bind closure
            $methodCallable = $this->_t__methods[$methodName];
        } else {
            $bindTo = $this->getBindTo();
            $methodCallable = function() use($methodName, $bindTo) {
                return call_user_func_array([$bindTo, $methodName], func_get_args());
            };
        }

        ## bind it into latest bind object
        $methodCallable = \Closure::bind(
            $methodCallable
            , $this->getBindTo()
            , get_class($this->getBindTo())
        );

        return $methodCallable;
    }
function getMethod ( $ methodName ) { if ( ! $ this -> hasMethod ( $ methodName ) ) throw new \ Exception ( sprintf ( 'Method (%s) not found.' , $ methodName ) ) ; if ( isset ( $ this -> _t__methods [ $ methodName ] ) ) { ## from bind closure $ methodCallable = $ this -> _t__methods [ $ methodName ] ; } else { $ bindTo = $ this -> getBindTo ( ) ; $ methodCallable = function ( ) use ( $ methodName , $ bindTo ) { return call_user_func_array ( [ $ bindTo , $ methodName ] , func_get_args ( ) ) ; } ; } ## bind it into latest bind object $ methodCallable = \ Closure :: bind ( $ methodCallable , $ this -> getBindTo ( ) , get_class ( $ this -> getBindTo ( ) ) ) ; return $ methodCallable ; }
Get Method Closure

!! if you need args called by reference use get method

@param string $methodName

@throws \Exception method not found
@return \Closure
Get Method Closure