public function setCallback($callback)
    {
        // If the provided $value is not a closure, make it one now for easy resolution.
        if (!is_callable($callback)) {
            $callback = function () use ($callback) {
                return $callback;
            };
        }

        if ($this->protected) {
            return $this;
        }

        $this->callback = $callback;

        return $this;
    }
public function setCallback($callback)
    {
        // If the provided $value is not a closure, make it one now for easy resolution.
        if (!is_callable($callback)) {
            $callback = function () use ($callback) {
                return $callback;
            };
        }

        if ($this->protected) {
            return $this;
        }

        $this->callback = $callback;

        return $this;
    }
public function setCallback ( $ callback ) { // If the provided $value is not a closure, make it one now for easy resolution. if ( ! is_callable ( $ callback ) ) { $ callback = function ( ) use ( $ callback ) { return $ callback ; } ; } if ( $ this -> protected ) { return $ this ; } $ this -> callback = $ callback ; return $ this ; }
Method to set property callback

@param   callable $callback

@throws  \InvalidArgumentException
@return  static  Return self to support chaining.
Method to set property callback