public static function create_stack() { $filename = HCImport::stack_temp(); if (file_exists($filename)) { unlink($filename); } Stack::create_file($filename); HCImport::load_stack(); HCImport::index_blocks(); HCImport::decode_stak(); $new_file = new Stack($filename); $new_stack = $new_file->stack_load(); $new_stack['card_width'] = HCImport::$stack['card_width']; $new_stack['card_height'] = HCImport::$stack['card_height']; $new_file->stack_save($new_stack); $new_file->zap_all_cards(); return HCImport::$stack; }
public static function save_stack($inbound, $outbound) { Util::keys_required($inbound, array('id', 'stack')); $stack = new Stack(Util::safe_stack_id($inbound['id'])); $outbound['record_version'] = $stack->stack_save($inbound['stack'], Util::optional($inbound, 'auth_hash')); return $outbound; }
public static function save_stack($inbound, $outbound) { $stack = new Stack(Util::safe_stack_id($inbound['stack_id'])); $stack->stack_save($inbound['stack']); $outbound['stack_id'] = $inbound['stack_id']; return Gateway::load_stack($inbound, $outbound); }