(size: usize)
| 28 | #[php_impl] |
| 29 | impl StylesheetCache { |
| 30 | pub fn __construct(size: usize) -> PhpResult<StylesheetCache> { |
| 31 | let size = NonZeroUsize::new(size).ok_or_else(|| { |
| 32 | PhpException::default("Cache size must be an integer greater than zero".to_string()) |
| 33 | })?; |
| 34 | Ok(StylesheetCache { size }) |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | #[php_class] |