protected function _getBasePath($plugin = false)
    {
        if ($plugin !== false) {
            return $this->_getPluginPath($plugin) . 'webroot' . DS;
        }

        return WWW_ROOT;
    }
protected function _getBasePath($plugin = false)
    {
        if ($plugin !== false) {
            return $this->_getPluginPath($plugin) . 'webroot' . DS;
        }

        return WWW_ROOT;
    }
protected function _getBasePath ( $ plugin = false ) { if ( $ plugin !== false ) { return $ this -> _getPluginPath ( $ plugin ) . 'webroot' . DS ; } return WWW_ROOT ; }
Get the base path to the app webroot or a plugin webroot.

@param bool|string $plugin Either false or the name of a plugin.
@return string
Get the base path to the app webroot or a plugin webroot .