Piwik\SettingsServer::isWindows PHP Method

isWindows() public static method

Returns true if running on a Windows operating system, false if otherwise.
Since: 0.6.5
public static isWindows ( ) : boolean
return boolean
    public static function isWindows()
    {
        return DIRECTORY_SEPARATOR === '\\';
    }

Usage Example

Example #1
0
    private function getLongErrorMessage()
    {
        $message = '<p>';

        if (SettingsServer::isWindows()) {
            $message .= $this->translator->translate(
                'Installation_SystemCheckWinPdoAndMysqliHelp',
                array('<br /><br /><code>extension=php_mysqli.dll</code><br /><code>extension=php_pdo.dll</code><br /><code>extension=php_pdo_mysql.dll</code><br />')
            );
        } else {
            $message .= $this->translator->translate(
                'Installation_SystemCheckPdoAndMysqliHelp',
                array(
                    '<br /><br /><code>--with-mysqli</code><br /><code>--with-pdo-mysql</code><br /><br />',
                    '<br /><br /><code>extension=mysqli.so</code><br /><code>extension=pdo.so</code><br /><code>extension=pdo_mysql.so</code><br />'
                )
            );
        }

        $message .= $this->translator->translate('Installation_RestartWebServer') . '<br/><br/>';
        $message .= $this->translator->translate('Installation_SystemCheckPhpPdoAndMysqli', array(
            '<a style="color:red" href="http://php.net/pdo">',
            '</a>',
            '<a style="color:red" href="http://php.net/mysqli">',
            '</a>',
        ));
        $message .= '</p>';

        return $message;
    }
All Usage Examples Of Piwik\SettingsServer::isWindows