Start a new palette.

@param string|null $name Only for backwards compatibility, We will remove palette names in the future
(deprecated).

@return PaletteBuilder
422134
public function createPalette($name = null)
    {
        if ($this->palette) {
            $this->finishPalette();
        }

        $palette = $this->paletteClass->newInstance();

        if ($name) {
            $palette->setName($name);
        }

        $event = new CreatePaletteEvent($palette, $this);
        $this->dispatchEvent($event);
        $this->palette = $event->getPalette();

        return $this;
    }
931175
public static function create($name = 'null') {
    $is_upper = FormatterFactory::getDefaultFormatter()->getConfig('boolean_null_upper');
    $node = new NullNode();
    $node->addChild(NameNode::create($is_upper ? 'NULL' : 'null'), 'constantName');
    return $node;
  }
235284
public function bot($name = null)
    {
        $name = $name ?: $this->getDefaultBot();

        if (!isset($this->bots[$name])) {
            $this->bots[$name] = $this->makeBot($name);
        }

        return $this->bots[$name];
    }
639274
public static function name(string $name) : ColumnLabelBuilder
    {
        $self       = new self();
        $self->name = $name;

        return new ColumnLabelBuilder($self);
    }
1045856
public function getTheme($name)
    {
        $key = $this->normalizeKey($name);
        
        return (array_key_exists($key, $this->themes)) ? $this->themes[$key] : null;
    }
867535
public static function createSpan($name)
    {
        return (self::$mode & self::MODE_TRACING) > 0
            ? self::$currentRootSpan->createSpan($name)
            : new \Tideways\Traces\NullSpan();
    }
712137
public function startStack($name, $content = null)
    {
        if (is_null($content)) {
            ob_start();
        }

        $this->stacks[] = $name;
        
        $this->pushes[$name] = $content;
    }
467436
public function startSection($name, $content = null)
    {

        $section = $this->getSectionCollection()->findOrCreate($name);

        $content ? $section->setContent($content) : $section->setContent('')->start();

        return $this;
    }
138861
public function load($name)
    {
        $stall = $this->redis->get("bstall_{$name}");

        if(is_null($stall)) {
            $this->clean();
            $this->save($name);
        } else {
            $canvas = unserialize($stall);
            $this->canvas = $canvas;
        }
    }
1048081
protected function createView($name = null)
    {
        if ($name == null) {
            $name = $this->action();
        }
        Artisan::call('make:view', [
            'name' => $name
        ]);
        $this->info('View ' . undot_path($name) .'.blade.php created.');
    }
1101386
public function createDefault($name = '默认的二维码')
    {
        $this->findOrInit([
            'name' => $name,
            'sceneId' => $this->getNextSceneId(),
        ]);
        $this->save();

        return $this;
    }
957856
static public function start($name=null){
		if (isset($_SESSION)) return;
		$ln = static::name($name);
    // Obfuscate IDs
    ini_set('session.hash_function', 'whirlpool');
		session_cache_limiter('must-revalidate');
    if (session_status() == PHP_SESSION_NONE) {
		  @session_start();
    }
    static::trigger("start", $name?:$ln);
	}
1129201
public function legend($name = null)
    {
        if (!is_null($name)) {
            $this->legend = $name;
        }

        return $this->legend;
    }
1147048
public static  function start($name, $key = null){
        if ($key) {
            $GLOBALS[ARX_HOOK][$name][$key] = '';
        } else {
            $GLOBALS[ARX_HOOK][$name] = '';
        }
        ob_start();
    }
1100374
public static function create($message, $name = null)
    {
        return Message::generic($message, self::$CSSClass, $name);
    }
954251
public function profileStart($name)
    {
        if (! $this->enable || \is_string($name) === false || empty($name)) {
            return;
        }
        $cid = Coroutine::tid();
        $this->profileStacks[$cid][$name]['start'] = microtime(true);
    }
182927
public function createStart($name, $attr = array())
    {
        $p = clone $this->p_start;
        $p->__construct($name, $attr);
        return $p;
    }