Skip to content

Commit 2f39d2f

Browse files
committed
Fixed #86
1 parent 8dcd6da commit 2f39d2f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1515
-38
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Caching\ArgoTieredCache;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Getter;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a getter model. This action
10+
* simply loads the initial value through the Cloudflare API. The rest of
11+
* this class extends on that functionality and adds more endpoints.
12+
* @version 1.3.9
13+
* @package JetRails® Cloudflare
14+
* @author Rafael Grigorian <development@jetrails.com>
15+
* @copyright © 2018 JETRAILS, All rights reserved
16+
* @license MIT https://opensource.org/licenses/MIT
17+
*/
18+
class Index extends Getter {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Caching\ArgoTieredCache;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Toggle as BaseToggle;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a switch section. This section
10+
* simply loads the initial value through the Cloudflare API as well as
11+
* gives the ability to change the value of said section to be on or off
12+
* though the 'toggle' action.
13+
* @version 1.3.9
14+
* @package JetRails® Cloudflare
15+
* @author Rafael Grigorian <development@jetrails.com>
16+
* @copyright © 2018 JETRAILS, All rights reserved
17+
* @license MIT https://opensource.org/licenses/MIT
18+
*/
19+
class Toggle extends BaseToggle {}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Caching\CrawlerHints;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Getter;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a getter model. This action
10+
* simply loads the initial value through the Cloudflare API. The rest of
11+
* this class extends on that functionality and adds more endpoints.
12+
* @version 1.3.9
13+
* @package JetRails® Cloudflare
14+
* @author Rafael Grigorian <development@jetrails.com>
15+
* @copyright © 2018 JETRAILS, All rights reserved
16+
* @license MIT https://opensource.org/licenses/MIT
17+
*/
18+
class Index extends Getter {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Caching\CrawlerHints;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Toggle as BaseToggle;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a switch section. This section
10+
* simply loads the initial value through the Cloudflare API as well as
11+
* gives the ability to change the value of said section to be on or off
12+
* though the 'toggle' action.
13+
* @version 1.3.9
14+
* @package JetRails® Cloudflare
15+
* @author Rafael Grigorian <development@jetrails.com>
16+
* @copyright © 2018 JETRAILS, All rights reserved
17+
* @license MIT https://opensource.org/licenses/MIT
18+
*/
19+
class Toggle extends BaseToggle {}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Caching\TieredCacheTopology;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Getter;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a getter model. This action
10+
* simply loads the initial value through the Cloudflare API. The rest of
11+
* this class extends on that functionality and adds more endpoints.
12+
* @version 1.3.9
13+
* @package JetRails® Cloudflare
14+
* @author Rafael Grigorian <development@jetrails.com>
15+
* @copyright © 2018 JETRAILS, All rights reserved
16+
* @license MIT https://opensource.org/licenses/MIT
17+
*/
18+
class Index extends Getter {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Caching\TieredCacheTopology;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Update as BaseUpdate;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a selection section. This section
10+
* simply loads the initial value through the Cloudflare API as well as
11+
* gives the ability to change the value of said section to whatever value
12+
* is being passed though the 'update' action.
13+
* @version 1.3.9
14+
* @package JetRails® Cloudflare
15+
* @author Rafael Grigorian <development@jetrails.com>
16+
* @copyright © 2018 JETRAILS, All rights reserved
17+
* @license MIT https://opensource.org/licenses/MIT
18+
*/
19+
class Update extends BaseUpdate {}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Firewall\FirewallRules;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Action;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a getter model. This action
10+
* simply loads the initial value through the Cloudflare API. The rest of
11+
* this class extends on that functionality and adds more endpoints.
12+
* @version 1.3.9
13+
* @package JetRails® Cloudflare
14+
* @author Rafael Grigorian <development@jetrails.com>
15+
* @copyright © 2018 JETRAILS, All rights reserved
16+
* @license MIT https://opensource.org/licenses/MIT
17+
*/
18+
class Create extends Action {
19+
20+
/**
21+
* This action takes in all the information that is necessary to create
22+
* a firewall rule through the request parameters. It then asks the
23+
* Cloudflare API model to create said firewall rule.
24+
* @return void
25+
*/
26+
public function execute () {
27+
$response = $this->_api->create (
28+
$this->_request->getParam ("name"),
29+
$this->_request->getParam ("expression"),
30+
$this->_request->getParam ("action"),
31+
$this->_request->getParam ("priority") == "" ? null : intval ( $this->_request->getParam ("priority") ),
32+
$this->_request->getParam ("paused") == "true",
33+
$this->_request->getParam ("products")
34+
);
35+
return $this->_sendResponse ( $response );
36+
}
37+
38+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Firewall\FirewallRules;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Action;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a getter model. This action
10+
* simply loads the initial value through the Cloudflare API. The rest of
11+
* this class extends on that functionality and adds more endpoints.
12+
* @version 1.3.9
13+
* @package JetRails® Cloudflare
14+
* @author Rafael Grigorian <development@jetrails.com>
15+
* @copyright © 2018 JETRAILS, All rights reserved
16+
* @license MIT https://opensource.org/licenses/MIT
17+
*/
18+
class Delete extends Action {
19+
20+
/**
21+
* This action takes in a firewall rule id from the request parameters
22+
* and it then asks the Cloudflare API model to delete said firewall
23+
* rule with the corresponding id.
24+
* @return void
25+
*/
26+
public function execute () {
27+
$response = $this->_api->delete (
28+
$this->_request->getParam ("id")
29+
);
30+
return $this->_sendResponse ( $response );
31+
}
32+
33+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Firewall\FirewallRules;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Getter;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a getter model. This action
10+
* simply loads the initial value through the Cloudflare API. The rest of
11+
* this class extends on that functionality and adds more endpoints.
12+
* @version 1.3.9
13+
* @package JetRails® Cloudflare
14+
* @author Rafael Grigorian <development@jetrails.com>
15+
* @copyright © 2018 JETRAILS, All rights reserved
16+
* @license MIT https://opensource.org/licenses/MIT
17+
*/
18+
class Index extends Getter {}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Firewall\FirewallRules;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Action;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a getter model. This action
10+
* simply loads the initial value through the Cloudflare API. The rest of
11+
* this class extends on that functionality and adds more endpoints.
12+
* @version 1.3.9
13+
* @package JetRails® Cloudflare
14+
* @author Rafael Grigorian <development@jetrails.com>
15+
* @copyright © 2018 JETRAILS, All rights reserved
16+
* @license MIT https://opensource.org/licenses/MIT
17+
*/
18+
class Update extends Action {
19+
20+
/**
21+
* This action takes in all the information that is necessary to edit a
22+
* firewall rule through the request parameters. It then asks the
23+
* Cloudflare API model to edit said firewall rule based on the id
24+
* that is passed.
25+
* @return void
26+
*/
27+
public function execute () {
28+
$response = $this->_api->update (
29+
$this->_request->getParam ("id"),
30+
$this->_request->getParam ("name"),
31+
$this->_request->getParam ("filterId"),
32+
$this->_request->getParam ("filterExpression"),
33+
$this->_request->getParam ("action"),
34+
$this->_request->getParam ("priority") == "" ? null : intval ( $this->_request->getParam ("priority") ),
35+
$this->_request->getParam ("paused") == "true",
36+
$this->_request->getParam ("products")
37+
);
38+
return $this->_sendResponse ( $response );
39+
}
40+
41+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Network\Grpc;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Getter;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a getter model. This action
10+
* simply loads the initial value through the Cloudflare API. The rest of
11+
* this class extends on that functionality and adds more endpoints.
12+
* @version 1.3.9
13+
* @package JetRails® Cloudflare
14+
* @author Rafael Grigorian <development@jetrails.com>
15+
* @copyright © 2018 JETRAILS, All rights reserved
16+
* @license MIT https://opensource.org/licenses/MIT
17+
*/
18+
class Index extends Getter {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Network\Grpc;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Toggle as BaseToggle;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a switch section. This section
10+
* simply loads the initial value through the Cloudflare API as well as
11+
* gives the ability to change the value of said section to be on or off
12+
* though the 'toggle' action.
13+
* @version 1.3.9
14+
* @package JetRails® Cloudflare
15+
* @author Rafael Grigorian <development@jetrails.com>
16+
* @copyright © 2018 JETRAILS, All rights reserved
17+
* @license MIT https://opensource.org/licenses/MIT
18+
*/
19+
class Toggle extends BaseToggle {}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Network\Http2ToOrigin;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Getter;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a getter model. This action
10+
* simply loads the initial value through the Cloudflare API. The rest of
11+
* this class extends on that functionality and adds more endpoints.
12+
* @version 1.3.9
13+
* @package JetRails® Cloudflare
14+
* @author Rafael Grigorian <development@jetrails.com>
15+
* @copyright © 2018 JETRAILS, All rights reserved
16+
* @license MIT https://opensource.org/licenses/MIT
17+
*/
18+
class Index extends Getter {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Network\Http2ToOrigin;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Toggle as BaseToggle;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a switch section. This section
10+
* simply loads the initial value through the Cloudflare API as well as
11+
* gives the ability to change the value of said section to be on or off
12+
* though the 'toggle' action.
13+
* @version 1.3.9
14+
* @package JetRails® Cloudflare
15+
* @author Rafael Grigorian <development@jetrails.com>
16+
* @copyright © 2018 JETRAILS, All rights reserved
17+
* @license MIT https://opensource.org/licenses/MIT
18+
*/
19+
class Toggle extends BaseToggle {}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Speed\EarlyHints;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Getter;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a getter model. This action
10+
* simply loads the initial value through the Cloudflare API. The rest of
11+
* this class extends on that functionality and adds more endpoints.
12+
* @version 1.3.9
13+
* @package JetRails® Cloudflare
14+
* @author Rafael Grigorian <development@jetrails.com>
15+
* @copyright © 2018 JETRAILS, All rights reserved
16+
* @license MIT https://opensource.org/licenses/MIT
17+
*/
18+
class Index extends Getter {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace JetRails\Cloudflare\Controller\Adminhtml\Api\Speed\EarlyHints;
4+
5+
use JetRails\Cloudflare\Controller\Adminhtml\Toggle as BaseToggle;
6+
7+
/**
8+
* This controller inherits from a generic controller that implements the
9+
* base functionality for interfacing with a switch section. This section
10+
* simply loads the initial value through the Cloudflare API as well as
11+
* gives the ability to change the value of said section to be on or off
12+
* though the 'toggle' action.
13+
* @version 1.3.9
14+
* @package JetRails® Cloudflare
15+
* @author Rafael Grigorian <development@jetrails.com>
16+
* @copyright © 2018 JETRAILS, All rights reserved
17+
* @license MIT https://opensource.org/licenses/MIT
18+
*/
19+
class Toggle extends BaseToggle {}

0 commit comments

Comments
 (0)