public function unserialize($serialized)
    {
        $payload = unserialize($serialized);

        // We will extract the variables into the current scope so that as the Closure
        // is built it will inherit the scope it had before it was serialized which
        // will emulate the Closures existing in that scope instead of right now.
        extract($payload['variables']);

        eval('$this->closure = '.$payload['code'].';');

        $this->reflection = new ReflectionFunction($this->closure);
    }
public function unserialize($serialized)
    {
        $payload = unserialize($serialized);

        // We will extract the variables into the current scope so that as the Closure
        // is built it will inherit the scope it had before it was serialized which
        // will emulate the Closures existing in that scope instead of right now.
        extract($payload['variables']);

        eval('$this->closure = '.$payload['code'].';');

        $this->reflection = new ReflectionFunction($this->closure);
    }
public function unserialize ( $ serialized ) { $ payload = unserialize ( $ serialized ) ; // We will extract the variables into the current scope so that as the Closure // is built it will inherit the scope it had before it was serialized which // will emulate the Closures existing in that scope instead of right now. extract ( $ payload [ 'variables' ] ) ; eval ( '$this->closure = ' . $ payload [ 'code' ] . ';' ) ; $ this -> reflection = new ReflectionFunction ( $ this -> closure ) ; }
Unserialize the Closure instance.

@param  string $serialized
@return void
Unserialize the Closure instance .