okwinza / cloudflare-api Goto Github PK
View Code? Open in Web Editor NEWCloudFlare API wrapper written in PHP
License: MIT License
CloudFlare API wrapper written in PHP
License: MIT License
Using composer 1.0-dev (40c14709f79f9d7ea35ac969cfbd7f41beb525bb), requiring this project with composer and loading the composer autoloader, an application will fail when it reaches a CFException for any reason:
Fatal error: Class 'okw\CF\Exception\CFException' not found in ./vendor/okwinza/cloudflare-api/okw/CF/CF.php on line 167
If then I add:
require "vendor/okwinza/cloudflare-api/okw/CF/CFException.php";
to the top of my PHP file, above:
require_once 'vendor/autoload.php';
it works as expected.
Could you add a license file to this repo?
Hi All,
I'm using Laravel 5.2 and have a controller thats firing an exception, however the class is then erroring internally, not sure what I'm doing wrong?
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use \okw\CF\CF;
class CloudflareController extends Controller
{
public function purge_url(Request $request, $url)
{
$api_client = new CF( 'email.com', 'key.com' );
$response = $api_client->zone_file_purge([
'z' => 'domain.com',
'url' => 'domain.com/file'
]);
}
}
I understand WHY its throwing the exception thats fine, however i get a different error
{
message: "Fatal error: Class 'okw\CF\Exception\CFException' not found",
status_code: 500,
debug: {
line: 167,
file: "/home/vagrant/selesti-api/vendor/okwinza/cloudflare-api/okw/CF/CF.php",
class: "Symfony\Component\Debug\Exception\FatalThrowableError",
trace: [
"#0 /home/vagrant/selesti-api/vendor/okwinza/cloudflare-api/okw/CF/CF.php(67): okw\CF\CF->executeRequest(Array)",
"#1 /home/vagrant/selesti-api/vendor/okwinza/cloudflare-api/okw/CF/CF.php(56): okw\CF\CF->post('zone_file_purge', Array)",
"#2 /home/vagrant/selesti-api/app/Http/Controllers/CloudflareController.php(43): okw\CF\CF->__call('zone_file_purge', Array)"]
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.