PHP code example of pickles2 / px2-sitemapexcel

1. Go to this page and download the library: Download pickles2/px2-sitemapexcel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pickles2 / px2-sitemapexcel example snippets



	/* 中略 */

	// funcs: Before sitemap
	$conf->funcs->before_sitemap = [
		 // PX=config
		'picklesFramework2\commands\config::register' ,

		 // PX=phpinfo
		'picklesFramework2\commands\phpinfo::register' ,

		// PX=clearcache
		'picklesFramework2\commands\clearcache::register' ,

		// sitemapExcel
		'tomk79\pickles2\sitemap_excel\pickles_sitemap_excel::exec'
	];


	// funcs: Before sitemap
	$conf->funcs->before_sitemap = [
		// sitemapExcel
		'tomk79\pickles2\sitemap_excel\pickles_sitemap_excel::exec('.json_encode(array(
			// `master_format`
			// マスターにするファイルフォーマットを指定します。
			//   - `timestamp` = タイムスタンプが新しい方をマスターにする(デフォルト)
			//   - `xlsx` = XLSXをマスターにする
			//   - `csv` = CSVをマスターにする
			//   - `pass` = 変換しない
			// のいずれかを指定します。
			'master_format'=>'timestamp',

			// `files_master_format`
			// サイトマップファイル名ごとにマスターにするファイルフォーマットを指定します。
			// ここに設定されていないファイルは、 `master_format` の設定に従います。
			'files_master_format'=>array(
				'timestamp_sitemap'=>'timestamp',
				'csv_master_sitemap'=>'csv',
				'xlsx_master_sitemap'=>'xlsx',
				'no_convert'=>'pass',
			),

			// `files_master_format_blogs`
			// ブログファイル名ごとにマスターにするファイルフォーマットを指定します。
			// ここに設定されていないファイルは、 `master_format` の設定に従います。
			'files_master_format_blogs'=>array(
				'timestamp_sitemap'=>'timestamp',
				'csv_master_sitemap'=>'csv',
				'xlsx_master_sitemap'=>'xlsx',
				'no_convert'=>'pass',
			),
		)).')'
	];

$ php ./vendor/phpunit/phpunit/phpunit