From ac46dc8e98629719370c98e0a4760f7cd6b25578 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 15 May 2026 00:19:50 +0900 Subject: feat(port): port Zip.php Add zip crate dependency and ZipArchive stub to shirabe-php-shim. Also add dirname and stream_get_contents shim functions. --- crates/shirabe-php-shim/src/lib.rs | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (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 27857a5..d129479 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -254,10 +254,53 @@ impl PharData { } } +#[derive(Debug)] +pub struct ZipArchive { + pub num_files: i64, +} + +impl ZipArchive { + pub fn new() -> Self { + todo!() + } + + pub fn open(&mut self, filename: &str) -> bool { + todo!() + } + + pub fn close(&self) { + todo!() + } + + pub fn locate_name(&self, name: &str) -> Option { + todo!() + } + + pub fn get_from_index(&self, index: i64) -> Option { + todo!() + } + + pub fn get_name_index(&self, index: i64) -> String { + todo!() + } + + pub fn get_stream(&self, name: &str) -> Option { + todo!() + } +} + pub trait JsonSerializable { fn json_serialize(&self) -> PhpMixed; } +pub fn dirname(path: &str) -> String { + todo!() +} + +pub fn stream_get_contents(stream: PhpMixed) -> Option { + todo!() +} + pub fn class_exists(name: &str) -> bool { todo!() } -- cgit v1.3.1