/** * @param string $tmpFile_ * * @return \Components\Memory_Shared_Shm_Temporary */ public static function create($file_ = null) { if (false === static::isSupported()) { throw new Exception_NotSupported('memory/shared/shm', 'Shared memory with \'shm\' is not supported. Compile PHP with \'--enable-sysvshm\'.'); } // FIXME Resolve dependency to i/o component. if (null === $file_) { $file_ = Io::tmpFileName('shm'); } return new static(ftok($file_, 'a'), $file_); }
/** * @param string $path_ * * @return \Components\Io_Image */ public static function createBlank() { // TODO See todo above - support virtual/memory-mapped io/file. $path = Io::tmpFileName(); return static::createForBase64("{$path}.gif", self::IMAGE_BLANK); }