Get/Set document title.

@param null|string $title title to set
@return mixed
3417
public function title($title = null)
    {
        if ($title === null) {
            return $this->_title;
        }
        $this->_title = $title;

        return $this;
    }
770777
public static function setTitle(string $title): bool
    {
        if (!$title || 'Darwin' === \PHP_OS) {
            return false;
        }

        if (\function_exists('cli_set_process_title')) {
            \cli_set_process_title($title);
        } elseif (\function_exists('setproctitle')) {
            \setproctitle($title);
        }

        if ($error = \error_get_last()) {
            throw new \RuntimeException($error['message']);
        }

        return false;
    }
1221941
public function withTitle($title)
    {
        Assertion::string($title);
        Assertion::notBlank($title);

        $instance = clone $this;

        $instance->title = $title;

        return $instance;
    }
498112
public function title(string $title)
    {
        $name = config('app.name');

        if (empty($this->subject) && ! is_null($name)) {
            $this->subject(sprintf('[%s] %s', $name, $title));
        }

        $this->title = $title;

        return $this;
    }
752524
public function getTitle()
    {
        if ($this->title === null) {
            $match = [];
            preg_match(self::$REGEX_TITLE, $this->output, $match);
            $this->title = array_key_exists(2, $match) ? trim($match[2]) : '';
        }

        return $this->title;
    }
411530
public function setTitle($title)
    {
        if (!empty($title)) {
            Yii::$app->view->registerMetaTag(['name' => 'title', 'content' => $title], 'title');
            Yii::$app->view->registerMetaTag(['name' => 'og:title', 'content' => $title], 'og:title');
            Yii::$app->view->title = $title;
        }
        return $this;
    }
701022
protected function getContentEditLink($link, $title) {
    $node = $this->getCore()->loadNodeByName($title);

    /** @var \Behat\Mink\Element\DocumentElement $element */
    $element = $this->getSession()->getPage();

    $locator = ($link ? array('link', sprintf("'%s'", $link)) : array('link', "."));

    /** @var \Behat\Mink\Element\NodeElement[] $links */
    $links = $element->findAll('named', $locator);

    // Loop over all the links on the page and check for the node edit path.
    foreach ($links as $result) {
      $target = $result->getAttribute('href');
      if (strpos($target, 'node/' . $this->getCore()->getNodeId($node) . '/edit') !== FALSE) {
        return $result;
      }
    }
    return NULL;
  }
694872
public function setTitle($title): Hybrid
    {
        self::validateSetLength('title', $title);
        $this->data['title'] = $title;

        return $this;
    }
466678
public function setTitle($title)
    {
        // Check if title already exists
        $headTitle = $this->selectElement('title')->item(0);
        if (!is_null($headTitle)) {
            $headTitle_new = $this->create('title', $title);
            $headTitle->parentNode->replaceChild($headTitle_new, $headTitle);
        } else {
            $headTitle = $this->create('title', $title);
            $this->appendToHead($headTitle);
        }

        return $this;
    }
641047
public function setTitle($title = null)
    {
        if ($title === null) {
            $this->title = null;
        }
        else {
            $this->title = (string) $title;
        }
        return $this;
    }
922222
public function title($title = null)
    {
        if ($title === null) {
            return $this->title;
        }

        $title = $this->plain($title);

        if (empty($this->metas['title'])) {
            $this->metas['title'] = $title;
        }

        return $this->title = $title;
    }
47447
protected static function detectTitle(array $title)
    {
        $assignment = $title['assignment'];
        if ($assignment === null) {
            return;
        }

        $where = array_merge(
            Utils\Utils::arrayWhitelist($title, [
                'assignment',
                'our_number',
                'due',
            ]),
            [
                'ORDER' => [
                    'stamp' => 'DESC',
                    'id' => 'DESC',
                ],
            ]
        );

        $ids = Models\Title::dump($where, 'id');
        if (empty($ids)) {
            return;
        }
        return $ids[0];
    }
416251
public function title(string $title = null): Htmlable
    {
        $page = Paginator::resolveCurrentPage();

        $data = [
            'site' => ['name' => $this->site],
            'page' => ['title' => $title, 'number' => $page],
        ];

        $data['site']['name'] = $this->getHtmlTitleFormatForSite($data);

        $output = $this->getHtmlTitleFormatForPage($data);

        return $this->html->create('title', trim($output));
    }
785619
public function createNode($title = null)
	{
		$node = new Node\ArrayNode();
		$node->setNodeTitle($title);
		$this->add($node);
		
		return $node;
	}
818943
public function setTitle($title, $siteName = null, $separator = null)
    {
        return $this->seo()->setTitle($title, $siteName, $separator);
    }
1219825
public function admin_title( array $title ) {
		$data = $this->collector->get_data();
		if ( isset( $data['log'] ) ) {
			$title[] = $this->title . ' (' .	count( $data['log'] ) . ')';
		}
		return $title;
	}
877793
protected function formatTitleWithAccessKey( $title ) {
		if ( $this->fieldWidget && method_exists( $this->fieldWidget, 'formatTitleWithAccessKey' ) ) {
			return $this->fieldWidget->formatTitleWithAccessKey( $title );
		}
		return $title;
	}