HM\BackUpWordPress\Mysqldump_Database_Backup_Engine::get_mysqldump_executable_path PHP Method

get_mysqldump_executable_path() public method

The executable path can be overridden using either the HMBKP_MYSQLDUMP_PATH Constant or the hmbkp_mysqldump_executable_path filter. If neither of those are set then we fallback to checking a number of common locations.
public get_mysqldump_executable_path ( ) : string | false
return string | false The path to the executable or false.
    public function get_mysqldump_executable_path()
    {
        // Return now if it's set in a Constant
        if (defined('HMBKP_MYSQLDUMP_PATH') && HMBKP_MYSQLDUMP_PATH) {
            $this->mysqldump_executable_path = HMBKP_MYSQLDUMP_PATH;
        }
        /**
         * Allow the executable path to be set via a filter
         *
         * @param string The path to the mysqldump executable
         */
        $this->mysqldump_executable_path = apply_filters('hmbkp_mysqldump_executable_path', '');
        if (!$this->mysqldump_executable_path) {
            // List of possible mysqldump locations
            $paths = array('mysqldump', '/usr/local/bin/mysqldump', '/usr/local/mysql/bin/mysqldump', '/usr/mysql/bin/mysqldump', '/usr/bin/mysqldump', '/opt/local/lib/mysql6/bin/mysqldump', '/opt/local/lib/mysql5/bin/mysqldump', '/opt/local/lib/mysql4/bin/mysqldump', '/xampp/mysql/bin/mysqldump', '/Program Files/xampp/mysql/bin/mysqldump', '/Program Files/MySQL/MySQL Server 6.0/bin/mysqldump', '/Program Files/MySQL/MySQL Server 5.7/bin/mysqldump', '/Program Files/MySQL/MySQL Server 5.6/bin/mysqldump', '/Program Files/MySQL/MySQL Server 5.5/bin/mysqldump', '/Program Files/MySQL/MySQL Server 5.4/bin/mysqldump', '/Program Files/MySQL/MySQL Server 5.1/bin/mysqldump', '/Program Files/MySQL/MySQL Server 5.0/bin/mysqldump', '/Program Files/MySQL/MySQL Server 4.1/bin/mysqldump', '/opt/local/bin/mysqldump');
            $this->mysqldump_executable_path = Backup_Utilities::get_executable_path($paths);
        }
        return $this->mysqldump_executable_path;
    }