Replace this path's name.

@param string $name The new path name.

@return PathInterface A new path instance with the supplied name replacing the existing one.
13739
public function replaceName($name)
    {
        $atoms = $this->atoms();
        $numAtoms = count($atoms);

        if ($numAtoms > 0) {
            if ('' === $name) {
                array_pop($atoms);
            } else {
                $atoms[$numAtoms - 1] = $name;
            }
        } elseif ('' !== $name) {
            $atoms[] = $name;
        }

        return $this->createPath(
            $atoms,
            $this instanceof AbsolutePathInterface,
            false
        );
    }
400411
public function child($name)
    {
        $path = $this->normalize($name);

        $this->append($path);

        return $this;
    }
781429
public function withName(string $name): self
    {
        $self = clone $this;
        $self->name = $name;

        return $self;
    }
475256
protected function createHeader($name)
    {
        $new = clone $this;

        $normalized = strtolower($name);

        $name = HeaderHelper::normalizeHeaderName($name);

        $new->headerNames[$normalized] = $name;
        $new->headers[$name] = [];

        return $new;
    }
1016408
public function rename($file , $name , $path )
    {
		$new = $path.'/'.$name;
		
		return \Image::make( $file )->save($new);
	}
1203912
final public function setName($name): Command
    {
        if (!$this->namespace) {
            parent::setName($name);
            return $this;
        }
        parent::setName(sprintf('%s:%s', $this->namespace, $name));
        return $this;
    }
1052594
public function oneNamed(string $name): ?Route
    {
        if (!array_key_exists($name, $this->named)) {
            return null;
        }

        return $this->named[$name];
    }
29760
public function name($name = null)
    {
        if (null === $name) {
            return $this->name;
        }

        $this->name = $name;

        return $this;
    }
548457
public function remove($name)
    {
        $new = clone $this;
        $key = mb_strtolower($name);
        foreach ($new->cookies as $i => $cookie) {
            if (mb_strtolower($cookie->getName()) === $key) {
                unset($new->cookies[$i]);
            }
        }

        return $new;
    }
331321
public static function newName($name)
    {
        if (file_exists($name)) {
            $extension = self::getFileExtension($name);
            $name = substr($name,0,(-strlen($extension)-1)) . '_' . sha1(uniqid(rand(), true)) . ".$extension";
        }
        return $name;
    }
930379
public function setName(string $name) : core\interfaces\Named
    {
        return parent::setName(ltrim($name, '-'));
    }
208234
public static function createFromName($name)
    {
        $value = array_search($name, static::$names, true);

        if (!$value) {
            throw new InvalidArgumentException(sprintf(
                'Level with name "%s" is not in list: %s',
                $name,
                implode(', ', static::$names)
            ));
        }

        return new static($value);
    }
1109650
function addName($name) {
    if (isset($this->children[$name])) {
      throw new \Exception("Name '$name' already exists.");
    }
    $this->internalAddName($name);
    return $this;
  }
220543
public function del($name)
    {
        $name = $this->prefix . $name;
        return setcookie($name, '', 1, $this->path, $this->domain, $this->secure, $this->httpOnly);
    }
878991
public function parse($name): Name
    {
        $name = $this->normalize($name);

        $segments = explode(',', $name);

        if (1 < count($segments)) {
            return $this->parseSplitName($segments[0], $segments[1], $segments[2] ?? '');
        }

        $parts = explode(' ', $name);

        foreach ($this->getMappers() as $mapper) {
            $parts = $mapper->map($parts);
        }

        return new Name($parts);
    }
1047588
private function updateComposer(string $name): RenameCommand
    {
        $this->task(
            'Updating config/app.php "name" property',
            function () use ($name) {
                $neededLine = "'name' => '".Str::ucfirst($this->getCurrentBinaryName())."'";

                if (! Str::contains($contents = $this->getConfig(), $neededLine)) {
                    return false;
                }
                File::put(
                    $this->app->configPath('app.php'),
                    Str::replaceFirst(
                        $neededLine,
                        "'name' => '".Str::ucfirst($name)."'",
                        $contents
                    )
                );
            }
        );

        $this->task(
            'Updating composer "bin"',
            function () use ($name) {
                $neededLine = '"bin": ["'.$this->getCurrentBinaryName().'"]';

                if (! Str::contains($contents = $this->getComposer(), $neededLine)) {
                    return false;
                }

                File::put(
                    $this->app->basePath('composer.json'),
                    Str::replaceFirst(
                        $neededLine,
                        '"bin": ["'.$name.'"]',
                        $contents
                    )
                );
            }
        );

        return $this;
    }
696999
public function setName($name)
    {
        $name = Str::cast($name);

        $this->name = $name->lower();

        return $this;
    }