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 8b9f2da

Browse files
Made the classes have name spaces.
1 parent 9056369 commit 8b9f2da

File tree

16 files changed

+63
-310
lines changed

16 files changed

+63
-310
lines changed

‎ChangeLog.md‎

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

3-
### 1.3.2 - 20108/10/24
3+
### 1.4.0
4+
- Made the classes have namespaces so that the repository can be imported as a dependency.
5+
6+
### 1.3.2 - 2018年10月24日
47
- Changed the default minimum height of screenshots.
58
- Tweaked the layout.
69

‎composer.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"require": {
33
"ext-mbstring": "*",
4-
"jonnyw/php-phantomjs": "4.*"
4+
"ext-json": "*",
5+
"jonnyw/php-phantomjs": "4.*",
56
},
67
"scripts": {
78
"post-install-cmd": [

‎web/include/class-list.php‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎web/include/class-map.php‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
);

‎web/include/class/browser/Browser.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php
2+
namespace PHPSimpleWebScraper\Browser;
3+
24

35
class Browser extends PhantomJSWrapper {
46

‎web/include/class/browser/PhantomJSWrapper.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
namespace PHPSimpleWebScraper\Browser;
23
use JonnyW\PhantomJs\Client;
34

45
abstract class PhantomJSWrapper {

‎web/include/class/browser/ScreenCapture.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
namespace PHPSimpleWebScraper\Browser;
23

34
class ScreenCapture extends PhantomJSWrapper {
45

‎web/include/class/scraper/ScraperHandler.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?php
2+
namespace PHPSimpleWebScraper\Scraper;
3+
use PHPSimpleWebScraper\Utility\Utility;
4+
use PHPSimpleWebScraper\Registry;
25

36
class ScraperHandler extends Utility {
47

@@ -32,7 +35,7 @@ private function ___setCacheDirectory() {
3235
public function do() {
3336

3437
$_aBaseArguments = $this->___getBaseArguments( $_REQUEST );
35-
$_sClassName = "Scraper_" . $this->___getOutputType( $_REQUEST );
38+
$_sClassName = "PHPSimpleWebScraper\Scraper\Scraper_" . $this->___getOutputType( $_REQUEST );
3639
$_oScraper = new $_sClassName(
3740
$_aBaseArguments,
3841
$this->___getClientArguments( $_REQUEST ),

‎web/include/class/scraper/Scraper_Base.php‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
<?php
2-
/**
3-
* Created by PhpStorm.
4-
* User: Internet
5-
* Date: 10/23/2018
6-
* Time: 11:55 PM
7-
*/
2+
namespace PHPSimpleWebScraper\Scraper;
3+
use PHPSimpleWebScraper\Utility\Utility;
4+
use PHPSimpleWebScraper\Registry;
85

96
class Scraper_Base extends Utility {
107

‎web/include/class/scraper/Scraper_html.php‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?php
2+
namespace PHPSimpleWebScraper\Scraper;
3+
use PHPSimpleWebScraper\Browser\Browser;
4+
25
/**
36
* Displays a response as HTML.
47
*/

0 commit comments

Comments
(0)

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