protected function getFunction($name)
    {
        if (empty($this->functions)) {
            foreach ($this->proxies as $proxy) {
                $this->logger->info(sprintf('Loading Proxy: %s', get_class($proxy)));

                // lazily set adapter
                $proxy->setAdapter($this->adapter);

                foreach ($proxy->getFunctions() as $fn) {
                    $this->logger->debug(sprintf('Loading Function: %s', $fn));
                    $this->functions[$fn] = array($proxy, $fn);
                }
            }
        }

        if (isset($this->functions[$name])) {
            return $this->functions[$name];
        }

        throw new \InvalidArgumentException("Function with name: {$name} is not provided by any Proxy.");
    }
protected function getFunction($name)
    {
        if (empty($this->functions)) {
            foreach ($this->proxies as $proxy) {
                $this->logger->info(sprintf('Loading Proxy: %s', get_class($proxy)));

                // lazily set adapter
                $proxy->setAdapter($this->adapter);

                foreach ($proxy->getFunctions() as $fn) {
                    $this->logger->debug(sprintf('Loading Function: %s', $fn));
                    $this->functions[$fn] = array($proxy, $fn);
                }
            }
        }

        if (isset($this->functions[$name])) {
            return $this->functions[$name];
        }

        throw new \InvalidArgumentException("Function with name: {$name} is not provided by any Proxy.");
    }
protected function getFunction ( $ name ) { if ( empty ( $ this -> functions ) ) { foreach ( $ this -> proxies as $ proxy ) { $ this -> logger -> info ( sprintf ( 'Loading Proxy: %s' , get_class ( $ proxy ) ) ) ; // lazily set adapter $ proxy -> setAdapter ( $ this -> adapter ) ; foreach ( $ proxy -> getFunctions ( ) as $ fn ) { $ this -> logger -> debug ( sprintf ( 'Loading Function: %s' , $ fn ) ) ; $ this -> functions [ $ fn ] = array ( $ proxy , $ fn ) ; } } } if ( isset ( $ this -> functions [ $ name ] ) ) { return $ this -> functions [ $ name ] ; } throw new \ InvalidArgumentException ( "Function with name: {$name} is not provided by any Proxy." ) ; }
Initializes functions and return callable

@param  string $name
@return callable
Initializes functions and return callable