public static function path($plugin, $file = null, $check = false)
    {
        $plugin = parent::path($plugin);

        if (!$file) {
            return $plugin;
        }

        $path = $plugin . $file;

        if ($check && !is_readable($path)) {
            throw new MissingPluginException(__d('me_tools', 'File or directory `{0}` does not exist', rtr($path)));
        }

        return $path;
    }
public static function path($plugin, $file = null, $check = false)
    {
        $plugin = parent::path($plugin);

        if (!$file) {
            return $plugin;
        }

        $path = $plugin . $file;

        if ($check && !is_readable($path)) {
            throw new MissingPluginException(__d('me_tools', 'File or directory `{0}` does not exist', rtr($path)));
        }

        return $path;
    }
public static function path ( $ plugin , $ file = null , $ check = false ) { $ plugin = parent :: path ( $ plugin ) ; if ( ! $ file ) { return $ plugin ; } $ path = $ plugin . $ file ; if ( $ check && ! is_readable ( $ path ) ) { throw new MissingPluginException ( __d ( 'me_tools' , 'File or directory `{0}` does not exist' , rtr ( $ path ) ) ) ; } return $ path ; }
Gets a path for a plugin.
It can also be used to get the path of a plugin file.
@param string $plugin Plugin name
@param string|null $file File
@param bool $check Checks if the file exists
@return string Path of the plugin or path of the path of a plugin file
@throws MissingPluginException
Gets a path for a plugin . It can also be used to get the path of a plugin file .