Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 200 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 200 Revision 991
Zeile 125... Zeile 125...
125
    private $pager;
125
    private $pager;
126
    private $manualDb;
126
    private $manualDb;
127
    private $presenter;
127
    private $presenter;
128
    private $autoCompleter;
128
    private $autoCompleter;
129
    private $checker;
129
    private $checker;
-
 
130
    /** @deprecated */
130
    private $prompt;
131
    private $prompt;
131
    private $configPaths;
132
    private $configPaths;
Zeile 132... Zeile 133...
132
 
133
 
133
    /**
134
    /**
Zeile 1626... Zeile 1627...
1626
    }
1627
    }
Zeile 1627... Zeile 1628...
1627
 
1628
 
1628
    /**
1629
    /**
1629
     * Set the prompt.
1630
     * Set the prompt.
-
 
1631
     *
-
 
1632
     * @deprecated The `prompt` configuration has been replaced by Themes and support will
1630
     *
1633
     * eventually be removed. In the meantime, prompt is applied first by the Theme, then overridden
-
 
1634
     * by any explicitly defined prompt.
-
 
1635
     *
1631
     * @param string $prompt
1636
     * Note that providing a prompt but not a theme config will implicitly use the `classic` theme.
1632
     */
1637
     */
1633
    public function setPrompt(string $prompt)
1638
    public function setPrompt(string $prompt)
1634
    {
1639
    {
-
 
1640
        $this->prompt = $prompt;
-
 
1641
 
-
 
1642
        if (isset($this->theme)) {
-
 
1643
            $this->theme->setPrompt($prompt);
1635
        $this->prompt = $prompt;
1644
        }
Zeile 1636... Zeile 1645...
1636
    }
1645
    }
1637
 
1646
 
1638
    /**
1647
    /**
Zeile 1674... Zeile 1683...
1674
            $theme = new Theme($theme);
1683
            $theme = new Theme($theme);
1675
        }
1684
        }
Zeile 1676... Zeile 1685...
1676
 
1685
 
Zeile -... Zeile 1686...
-
 
1686
        $this->theme = $theme;
-
 
1687
 
-
 
1688
        if (isset($this->prompt)) {
-
 
1689
            $this->theme->setPrompt($this->prompt);
1677
        $this->theme = $theme;
1690
        }
1678
 
1691
 
1679
        if (isset($this->output)) {
1692
        if (isset($this->output)) {
1680
            $this->output->setTheme($theme);
1693
            $this->output->setTheme($theme);
1681
            $this->applyFormatterStyles();
1694
            $this->applyFormatterStyles();
Zeile 1686... Zeile 1699...
1686
     * Get the current output Theme.
1699
     * Get the current output Theme.
1687
     */
1700
     */
1688
    public function theme(): Theme
1701
    public function theme(): Theme
1689
    {
1702
    {
1690
        if (!isset($this->theme)) {
1703
        if (!isset($this->theme)) {
-
 
1704
            // If a prompt is explicitly set, and a theme is not, base it on the `classic` theme.
-
 
1705
            $this->theme = $this->prompt ? new Theme('classic') : new Theme();
-
 
1706
        }
-
 
1707
 
-
 
1708
        if (isset($this->prompt)) {
1691
            $this->theme = new Theme();
1709
            $this->theme->setPrompt($this->prompt);
1692
        }
1710
        }
Zeile 1693... Zeile 1711...
1693
 
1711
 
1694
        return $this->theme;
1712
        return $this->theme;