Move model in the $destination.

@param $destination -1 (move down) or 1 (move up)
19794
protected function move($destination)
    {
        if ($previousRow = static::orderModel()->findByPosition($this->getOrderValue() - $destination)->first()) {
            $previousRow->{$this->getOrderField()} += $destination;
            $previousRow->save();
        }

        $this->{$this->getOrderField()} -= $destination;
        $this->save();
    }
572632
public function setMoves($moves)
  {
    $moves = trim($moves);

    $this->moves = $moves;
    $this->movesCount = count(explode(' ', $moves));
  }
404476
protected function resolveDestination($destination)
    {
        foreach ($this->router->getCurrentRoute()->parameters() as $key => $value) {
            $destination = str_replace("{{$key}}", $value, $destination);
        }

        // Remove non existent optional params from destination
        // but after existent params has been resolved
        $destination = preg_replace('/\/{[\w-_]+}/', '', $destination);

        return $destination;
    }
678465
public function cast(string $destination)
    {
        if (!is_subclass_of($destination, get_class($this))) {
            throw new \InvalidArgumentException(sprintf(
                '%s is not a descendant of $object class: %s.',
                $destination,
                get_class($this)
            ));
        }

        $data = Serializer::serialize($this);
        $data['@type'] = $destination;

        $reflection = new \ReflectionClass($destination);
        $return = $reflection->newInstanceWithoutConstructor();
        Serializer::unserialize($return, $data);

        return $return;
    }
794883
final public function redirect(string $destination) {
		$this->request_handled = true;
		self::$logger->info(sprintf(
			"Router: redirect: '%s' -> '%s'.",
			$this->request_path, $destination));
		if (!method_exists($this, 'redirect_custom'))
			$this->redirect_default($destination);
		else
			$this->redirect_custom($destination);
		static::halt();
	}
493639
public function move(FilesystemFolder $destination) {

		// already in destination folder, nothing to do

		if($destination !== $this->folder) {

			$oldpath	= $this->folder->getPath() . $this->filename;
			$newpath	= $destination->getPath() . $this->filename;
	
			if(@rename($oldpath, $newpath)) {

				$this->clearCacheEntries();
				
				// set new folder reference

				$this->folder = $destination;
	
				// re-read fileinfo

				$this->fileInfo	= new \SplFileInfo($newpath);

				self::$instances[$newpath] = $this;
				unset(self::$instances[$oldpath]);

				// @todo: check necessity of chmod
	
				@chmod($newpath, 0666 & ~umask());
				
			}
	
			else {
				throw new FilesystemFileException("Moving from '$oldpath' to '$newpath' failed.", FilesystemFileException::FILE_RENAME_FAILED);
			}

		}

		return $this;
	}
1075221
public function upload($filename, $destination)
    {
        if (isset($this[$filename])) {
            $file = $this[$filename];
            if (is_uploaded_file($file[static::TMP_NAME])) {
                try {
                    return move_uploaded_file($file[static::TMP_NAME], $destination);
                } catch (\Exception $e) {
                    var_dump($e->getMessage());
                    exit();
                }
            }
        }
        return false;
    }
857528
public function move(Dir $destination) {
    $ret = @rename((string) $this,(string) $destination);

    $errInfo = 'Kann Verzeichnis '.$this.' nicht nach '.$destination.' verschieben / umbenennen.';
    
    if (!$ret) {
      if ($destination->exists())
        throw new Exception($errInfo.' Das Zielverzeichnis existiert.');

      if (!$this->exists())
        throw new Exception($errInfo.' Das Quellverzeichnis existiert nicht.');
      else 
        throw new Exception($errInfo);
    }


    /* wir übernehmen die Pfade von $destination */
    $this->path = $destination->getPathArray();
    return $this;
  }
952323
public function send($destination, Message $message)
    {
        return $this->getClient()->send($destination, $message, ['transaction' => $this->transactionId], false);
    }
365098
def move(self, member, destination):
        
        destination = self._typesafe(destination)
        return self._client.smove(
            self.key_prefix, destination, self._dumps(member))
806593
public function setDestination($destination)
    {
        if ($destination instanceof Closure) {
            $this->callbacks['destination'] = $destination;
        } else {
            $this->options = self::parsePath($destination) + $this->options;
        }

        return $this;
    }
273453
public function move(string $destination): Response {
        $uri         = $this->fedora->sanitizeUri($this->uri);
        $destination = $this->fedora->sanitizeUri($destination);
        $request     = new Request('MOVE', $uri, ['Destination' => $destination]);
        $response    = $this->fedora->sendRequest($request);
        $cache       = $this->fedora->getCache();
        $cache->deleteById($this->getId());
        $cache->add($this);
        return $response;
    }
1200030
public function moveBefore($model)
    {
        if ( is_numeric($model) ) {
            $model = call_user_func("$this->ownerClassName::findOne", $model);
        }
        $parentId = $this->parentIdField ? $model->{$this->parentIdField} : 0;
        if ( $model->{$this->sortField} < 1 ) {
            $this->reorder($parentId);
            $model->refresh();
        }
        $prevIdx = $this->getMaxIdx($parentId, $model->{$this->sortField});
        if ( $model->{$this->sortField} - $prevIdx < 2 ) {
            $this->reorder($parentId);
            $model->refresh();
            $prevIdx = $this->getMaxIdx($parentId, $model->{$this->sortField});
        }
        $newIdx = $model->{$this->sortField} - floor(($model->{$this->sortField} - $prevIdx)/2);
        if ( $this->parentIdField ) {
            call_user_func("$this->ownerClassName::updateAll", [
                $this->sortField => $newIdx,
                $this->parentIdField => $parentId,
            ], [ $this->primaryKey => $this->owner->primaryKey ]);
        } else {
            call_user_func("$this->ownerClassName::updateAll",
                [ $this->sortField => $newIdx ],
                [ $this->primaryKey => $this->owner->primaryKey ]);
        }
        $this->invalidateTagDependency();
    }
719967
public function put(string $destination, $contents): bool
    {
        return $this->disk->put($destination, $contents, $this->diskOptions);
    }
946605
public function setDestination($destination): void
    {
        $this->destination = (substr($destination, -1) == '/') ? substr($destination, 0, -1) : $destination;
    }
1220028
public function move($target, $source)
    {
        $this->copy($target, $source);

        $this->delete($target);
    }
296486
protected function move($resource, $movement)
    {
        $resource->setPosition($resource->getPosition() + $movement);

        // TODO use ResourceManager
        $event = $this->getOperator()->update($resource);
        $event->toFlashes($this->getFlashBag());
    }