src/VirtualPage.php
public function set($fx = [], $junk = null)
    {
        if (!$fx) {
            return $this;
        }

        if ($this->fx) {
            throw new Exception([
                'Callback for this Virtual Page is already defined',
                'vp'     => $this,
                'old_fx' => $this->fx,
                'new_fx' => $fx,
            ]);
        }
        $this->fx = $fx;

        return $this;
    }
public function set($fx = [], $junk = null)
    {
        if (!$fx) {
            return $this;
        }

        if ($this->fx) {
            throw new Exception([
                'Callback for this Virtual Page is already defined',
                'vp'     => $this,
                'old_fx' => $this->fx,
                'new_fx' => $fx,
            ]);
        }
        $this->fx = $fx;

        return $this;
    }
public function set ( $ fx = [ ] , $ junk = null ) { if ( ! $ fx ) { return $ this ; } if ( $ this -> fx ) { throw new Exception ( [ 'Callback for this Virtual Page is already defined' , 'vp' => $ this , 'old_fx' => $ this -> fx , 'new_fx' => $ fx , ] ) ; } $ this -> fx = $ fx ; return $ this ; }
Set callback function of virtual page.

Note that only one callback function can be defined.

@param array $fx   Need this to be defined as arrayotherwise we get warning in PHP7
@param mixed $junk

@return $this
Set callback function of virtual page .