From 213c3d019a43d765638c2a0fdf26b7b322899ca1 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 12 May 2026 04:20:57 +0900 Subject: feat(port): port GzipDownloader.php --- crates/shirabe-php-shim/src/lib.rs | 50 +++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) (limited to 'crates/shirabe-php-shim/src') diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs index f1a9fb1..ef74970 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -1,6 +1,6 @@ use indexmap::IndexMap; -#[derive(Debug)] +#[derive(Debug, Clone)] pub enum PhpMixed { Null, Bool(bool), @@ -47,6 +47,54 @@ pub fn hash(algo: &str, data: &str) -> String { todo!() } +pub fn extension_loaded(name: &str) -> bool { + todo!() +} + +pub fn gzopen(file: &str, mode: &str) -> PhpMixed { + todo!() +} + +pub fn gzread(file: PhpMixed, length: i64) -> String { + todo!() +} + +pub fn gzclose(file: PhpMixed) { + todo!() +} + +pub fn fopen(file: &str, mode: &str) -> PhpMixed { + todo!() +} + +pub fn fwrite(file: PhpMixed, data: &str, length: i64) { + todo!() +} + +pub fn fclose(file: PhpMixed) { + todo!() +} + +pub fn parse_url(url: &str, component: i64) -> PhpMixed { + todo!() +} + +pub fn pathinfo(path: PhpMixed, option: i64) -> PhpMixed { + todo!() +} + +pub fn strtr(str: &str, from: &str, to: &str) -> String { + todo!() +} + +pub fn implode(glue: &str, pieces: &[String]) -> String { + todo!() +} + +pub const PHP_URL_PATH: i64 = 5; +pub const PATHINFO_FILENAME: i64 = 64; +pub const DIRECTORY_SEPARATOR: &str = "/"; + pub const HHVM_VERSION: Option<&str> = None; #[derive(Debug)] -- cgit v1.3.1