Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b368580

Browse files
Added the dependency, PHP Class Map Generator.
1 parent 8b9f2da commit b368580

File tree

6 files changed

+122
-60
lines changed

6 files changed

+122
-60
lines changed

‎ChangeLog.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Change Log
22

3-
### 1.4.0
3+
### 1.4.0 - 2020年04月01日
4+
- Added the dependency, PHP Class Map Generator.
45
- Made the classes have namespaces so that the repository can be imported as a dependency.
56

67
### 1.3.2 - 2018年10月24日

‎composer.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"ext-mbstring": "*",
44
"ext-json": "*",
55
"jonnyw/php-phantomjs": "4.*",
6+
"michaeluno/php-classmap-generator": "1.*"
67
},
78
"scripts": {
89
"post-install-cmd": [

‎composer.lock‎

Lines changed: 81 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tool/classmap/classmap-generator.php‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
$_sProjectRootDirPath = dirname( dirname( __DIR__ ) );
4+
include( $_sProjectRootDirPath . '/vendor/autoload.php' );
5+
6+
new \PHPClassMapGenerator\PHPClassMapGenerator(
7+
$_sProjectRootDirPath . '/web', // base dir path
8+
[ $_sProjectRootDirPath . '/web/include', ], // scan dir paths
9+
$_sProjectRootDirPath . '/web/include/class-map.php', // output file path
10+
array(
11+
'output_buffer' => true,
12+
'exclude_classes' => [ 'TestClass' ],
13+
'output_var_name' => 'return',
14+
'base_dir_var' => '\PHPSimpleWebScraper\Registry::$sDirPath',
15+
'search' => array(
16+
'allowed_extensions' => array( 'php' ),
17+
'exclude_dir_paths' => array( __DIR__ . '/includes/class/admin' ),
18+
'exclude_dir_names' => array( '_del', '_bak' ),
19+
'exclude_file_names' => [ 'test.php', 'uninsall.php' ],
20+
'is_recursive' => true,
21+
),
22+
)
23+
);

‎tool/classmap/run.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/php
2+
php classmap-generator.php
3+
$SHELL

‎web/include/class-map.php‎

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
<?php
2-
namespace PHPSimpleWebScraper;
3-
return array(
4-
'PHPSimpleWebScraper\\Browser\\PhantomJSWrapper' => Registry::$sDirPath . '/include/class/browser/PhantomJSWrapper.php',
5-
'PHPSimpleWebScraper\\Browser\\ScreenCapture' => Registry::$sDirPath . '/include/class/browser/ScreenCapture.php',
6-
'PHPSimpleWebScraper\\Browser\\Browser' => Registry::$sDirPath . '/include/class/browser/Browser.php',
7-
'PHPSimpleWebScraper\\Utility\\Utility' => Registry::$sDirPath . '/include/class/utility/Utility.php',
8-
'PHPSimpleWebScraper\\Scraper\\ScraperHandler' => Registry::$sDirPath . '/include/class/scraper/ScraperHandler.php',
9-
'PHPSimpleWebScraper\\Scraper\\Scraper_Base' => Registry::$sDirPath . '/include/class/scraper/Scraper_Base.php',
10-
'PHPSimpleWebScraper\\Scraper\\Scraper_screenshot' => Registry::$sDirPath . '/include/class/scraper/Scraper_screenshot.php',
11-
'PHPSimpleWebScraper\\Scraper\\Scraper_html' => Registry::$sDirPath . '/include/class/scraper/Scraper_html.php',
12-
'PHPSimpleWebScraper\\Scraper\\Scraper_json' => Registry::$sDirPath . '/include/class/scraper/Scraper_json.php',
13-
);
1+
<?php
2+
return array(
3+
"PHPSimpleWebScraper\Browser\Browser" => \PHPSimpleWebScraper\Registry::$sDirPath . "/include/class/browser/Browser.php",
4+
"PHPSimpleWebScraper\Browser\PhantomJSWrapper" => \PHPSimpleWebScraper\Registry::$sDirPath . "/include/class/browser/PhantomJSWrapper.php",
5+
"PHPSimpleWebScraper\Browser\ScreenCapture" => \PHPSimpleWebScraper\Registry::$sDirPath . "/include/class/browser/ScreenCapture.php",
6+
"PHPSimpleWebScraper\Scraper\ScraperHandler" => \PHPSimpleWebScraper\Registry::$sDirPath . "/include/class/scraper/ScraperHandler.php",
7+
"PHPSimpleWebScraper\Scraper\Scraper_Base" => \PHPSimpleWebScraper\Registry::$sDirPath . "/include/class/scraper/Scraper_Base.php",
8+
"PHPSimpleWebScraper\Scraper\Scraper_html" => \PHPSimpleWebScraper\Registry::$sDirPath . "/include/class/scraper/Scraper_html.php",
9+
"PHPSimpleWebScraper\Scraper\Scraper_json" => \PHPSimpleWebScraper\Registry::$sDirPath . "/include/class/scraper/Scraper_json.php",
10+
"PHPSimpleWebScraper\Scraper\Scraper_screenshot" => \PHPSimpleWebScraper\Registry::$sDirPath . "/include/class/scraper/Scraper_screenshot.php",
11+
"PHPSimpleWebScraper\Utility\Utility" => \PHPSimpleWebScraper\Registry::$sDirPath . "/include/class/utility/Utility.php",
12+
);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /