$file) { $layer = "v$layer"; $docs[] = [ 'tl_schema' => ['telegram' => $file, 'mtproto' => '', 'secret' => '', 'td' => ''], 'title' => 'MadelineProto API documentation (layer '.$layer.')', 'description' => 'MadelineProto API documentation (layer '.$layer.')', 'output_dir' => \getcwd()."/docs/old_docs/API_docs_".$layer, 'template' => \getcwd()."/docs/template", 'readme' => true, ]; $layer_list .= "[Layer $layer](API_docs_$layer/) \n"; } \file_put_contents('docs/old_docs/README.md', '--- title: Documentation of old mtproto layers description: Documentation of old mtproto layers --- # Documentation of old mtproto layers '.$layer_list); return $docs; }