1
1
Cagoi screenshots
2
2
=================
3
3
4
- Library for easy screenshots making
4
+ Library for an easy screenshots making
5
5
6
6
7
7
Quick structure description
8
8
---------------------------
9
9
10
- ###"Root directory"
10
+ ### "Root directory"
11
+
11
12
** Cagoi\Screenshots\Client** - this class manages all process;
12
13
13
14
** Cagoi\Screenshots\ImageCreator** - helps create images by response from server;
14
15
15
16
** Cagoi\Screenshots\Exception** - library exception;
16
17
17
- ###"Adapter" directory
18
+ ### "Adapter" directory
19
+
18
20
In this directory you can find predefined adapters. Now available adapter for MongoDb, but you can define new adapter
19
21
for your own purposes.
20
22
@@ -23,10 +25,10 @@ It needs for handle such operations:
23
25
- Get screenshot;
24
26
- Callback processing.
25
27
26
- ###"Logger" directory
28
+ ### "Logger" directory
27
29
Classes for log work process. You can define new logger for your own purposes. Cagoi\Screenshots\Logger\FileLogger - log in file
28
30
29
- ###"Params" directory
31
+ ### "Params" directory
30
32
Classes in this directory helps prepare request parameters:
31
33
32
34
** Cagoi\Screenshots\Params\GetParams** - helps with parameters for get screenshot request
@@ -82,19 +84,19 @@ $params->setCallback("http://my.site.com/callback");
82
84
$params->setElementId("<element id >");
83
85
// Delay in milliseconds
84
86
$params->setDelay(1000);
85
- // Set scale width = 300px, height = auto scale
87
+ // Set scale width = 300px, height = 0 ( auto scale)
86
88
$params->addWidthScale(300);
87
- // Set scale width = auto scale, height = 300px
89
+ // Set scale width = 0 ( auto scale) , height = 300px
88
90
$params->addHeightScale(300);
89
91
// Set scale width = 300px, height = 300px
90
92
$params->addScale(300, 300);
91
93
92
94
$creator = Cagoi\Screenshots\ImageCreator();
93
95
// Create full image
94
96
$creator->add('full', '<path to save >', '<filename >');
95
- // Create image with width = 300px, height = auto scale
97
+ // Create image with width = 300px, height = 0 ( auto scale)
96
98
$creator->add('300x0', '<path to save >', '<filename >');
97
- // Create image with width = auto scale, height = 300px
99
+ // Create image with width = 0 ( auto scale) , height = 300px
98
100
$creator->add('0x300', '<path to save >', '<filename >');
99
101
// Create image with width = 300px, height = 300px
100
102
$creator->add('300x300', '<path to save >', '<filename >');
0 commit comments