Set a save callback

@param callback $Callback
@param array $Options Callback options
@return boolean
427934
public function AssignCallback($Callback, $Options = NULL) {
      if (!is_callable($Callback)) return FALSE;
      
      $this->Callback = $Callback;
      $this->CallbackOptions = $Options;
   }
1028573
public function exists(callable $callback): bool
    {
        $index = 0;
        foreach ($this->items as $key => $item) {
            if (true === $callback($item, $key, $index++)) {
                return true;
            }
        }

        return false;
    }
124785
public function setOptions(array $options)
    {
        if (isset($options['path']) && is_dir($options['path'])) {
            $this->_path = $options['path'];
        }
        if (isset($options['callback']) && is_callable($options['callback'])) {
            $this->_callback = $options['callback'];
        }
    }
602181
final public function setDebug($callback = true)
    {
        if ($callback === true) {
            if (php_sapi_name() === 'cli') {
                $callback = new DebuggerOutConsole();
            } else {
                $callback = new DebuggerOutHtml();
            }
        }
        $this->debugCallback = $callback;
    }
196724
public static function set(string $name, callable $callback)
    {
        if ($name = \trim($name)) {
            self::$validators[$name] = $callback;
        }
    }
728095
public function addLifecycleCallback(string $callback, string $event) : void
    {
        if (isset($this->lifecycleCallbacks[$event]) && in_array($callback, $this->lifecycleCallbacks[$event])) {
            return;
        }

        $this->lifecycleCallbacks[$event][] = $callback;
    }
652149
public function save(array $options = [])
    {
        if (is_null($this->id)) {
            $this->id = Uuid::uuid4()->toString();
        }
        $recently_unlocked = false;
        if (is_null($this->unlockedAt) && $this->isUnlocked()) {
            $recently_unlocked = true;
            $this->points = $this->details->points;
            $this->unlocked_at = Carbon::now();
        }

        $result = parent::save($options);

        // Gets the achievement class for this progress
        $class = $this->details->getClass();

        if ($recently_unlocked) {
            // Runs the callback set to run when the achievement is unlocked.
            $class->triggerUnlocked($this);
        } elseif ($this->points >= 0) {
            // Runs the callback set to run when progress has been made on the achievement.
            $class->triggerProgress($this);
        }

        return $result;
    }
131552
public function on($names, $callback)
    {
        if (! is_array($names)) {
            $names = [$names];
        }

        $callable = $this->getCallable($callback);

        foreach ($names as $name) {
            $this->events[] = [
                'name' => $name,
                'callback' => $callable,
            ];
        }
    }
801253
public function save( array $options = [] )
    {
        $query = $this->newQueryWithoutScopes();

        // If the "saving" event returns false we'll bail out of the save and return
        // false, indicating that the save failed. This provides a chance for any
        // listeners to cancel save operations if validations fail or whatever.
        if ($this->fireModelEvent('saving') === false) {
            return false;
        }

        // If the model already exists in the database we can just update our record
        // that is already in this database using the current IDs in this "where"
        // clause to only update this model. Otherwise, we'll just insert them.
        if ($this->exists) {
            $saved = $this->performUpdate($query, $options);
            self::$lastUpdated = $this;
        }

        // If the model is brand new, we'll insert it into our database and set the
        // ID attribute on the model to the value of the newly inserted row's ID
        // which is typically an auto-increment value managed by the database.
        else {
            $saved = $this->performInsert($query, $options);
            self::$lastCreated = $this;
        }

        if ($saved) {
            $this->finishSave($options);
        }

        return $saved;
    }
196261
public function save(array $options = [])
    {
        $this->attributes['slug'] = str_slug($this->attributes['name']);

        return parent::save($options);
    }
832235
public function transaction(callable $callback = null)
    {
        $transaction = $this->client()->multi();

        return is_null($callback)
            ? $transaction
            : tap($transaction, $callback)->exec();
    }
473766
protected function setCallback($callback) {
		if (!is_callable($callback)) {
			throw new InvalidCallbackException('Invalid callback');
		}

		$this->reflection_parameter =  $this
			     ->getCallbackReflection($callback)
			     ->getParameters()
		;
		$this->callback = $callback;

		return $this;
	}
790492
public function set($callback, $args = [])
    {
        if (!$this->app) {
            throw new Exception(['Call-back must be part of a RenderTree']);
        }

        $this->view = $this->owner;

        if (isset($_GET[$this->name])) {
            $this->triggered = $_GET[$this->name];

            $this->app->run_called = true;
            $this->app->stickyGet($this->name);
            $ret = call_user_func_array($callback, $args);
            $this->sendSse();

            return $ret;
        }

        return $this;
    }
1188185
public function setCallback($callback)
    {
        if (is_array($callback)) {
            require_once 'Zend/Server/Method/Callback.php';
            $callback = new Zend_Server_Method_Callback($callback);
        } elseif (!$callback instanceof Zend_Server_Method_Callback) {
            require_once 'Zend/Server/Exception.php';
            throw new Zend_Server_Exception('Invalid method callback provided');
        }
        $this->_callback = $callback;
        return $this;
    }
250231
public function setUserCallback (callable $callback)
	{
		//$this->usercallback = $callback;

		if (count ($this->usercallback) > 0)
			throw new InvalidParameter ("A usercallback was already set. Use addUserCallback to add multiple callbacks");

		$this->addUserCallback ('default', $callback);

		return $this;
	}
503934
protected function getCallback($callback, array $parameters)
    {
        if ($callback instanceof Closure) {
            return $this->createCallableCallback($callback, $parameters);
        } elseif (is_string($callback)) {
            return $this->createStringCallback($callback, $parameters);
        } else {
            return;
        }
    }
983241
public function setEditableRowCallback($callback)
    {
        $this->isEditable() ?: $this->setEditable();
        $this->editableRowCallback = $callback;

        return $this;
    }