public function getVariables()
    {
        if (!$this->getUseIndex()) {
            return array();
        }

        $staticVariables = $this->reflection->getStaticVariables();

        // When looping through the variables, we will only take the variables that are
        // specified in the use clause, and will not take any other static variables
        // that may be used by the Closures, allowing this to re-create its state.
        $usedVariables = array();

        foreach ($this->getUseClauseVariables() as $variable) {
            $variable = trim($variable, ' $&');

            $usedVariables[$variable] = $staticVariables[$variable];
        }

        return $usedVariables;
    }
public function getVariables()
    {
        if (!$this->getUseIndex()) {
            return array();
        }

        $staticVariables = $this->reflection->getStaticVariables();

        // When looping through the variables, we will only take the variables that are
        // specified in the use clause, and will not take any other static variables
        // that may be used by the Closures, allowing this to re-create its state.
        $usedVariables = array();

        foreach ($this->getUseClauseVariables() as $variable) {
            $variable = trim($variable, ' $&');

            $usedVariables[$variable] = $staticVariables[$variable];
        }

        return $usedVariables;
    }
public function getVariables ( ) { if ( ! $ this -> getUseIndex ( ) ) { return array ( ) ; } $ staticVariables = $ this -> reflection -> getStaticVariables ( ) ; // When looping through the variables, we will only take the variables that are // specified in the use clause, and will not take any other static variables // that may be used by the Closures, allowing this to re-create its state. $ usedVariables = array ( ) ; foreach ( $ this -> getUseClauseVariables ( ) as $ variable ) { $ variable = trim ( $ variable , ' $&' ) ; $ usedVariables [ $ variable ] = $ staticVariables [ $ variable ] ; } return $ usedVariables ; }
Get the variables used by the Closure.

@return array
Get the variables used by the Closure .