Code Monkey home page Code Monkey logo

cloudflare-api's People

Contributors

okwinza avatar scrutinizer-auto-fixer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cloudflare-api's Issues

CFException does not seem to be auto-loaded by composer.

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.

Fatal error: Class 'okw\CF\Exception\CFException' not found

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)"]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.