Giter Site home page Giter Site logo

Comments (4)

approached avatar approached commented on May 10, 2024

I have create a autoload.php class:

function google_chart_autoload($className)
{
    $classPath = explode('\\', $className);
    if ($classPath[0] != 'Khill') {
        return;
    }
    $filePath = dirname(__FILE__) . '/src/' . implode('/', $classPath) . '.php';

    if (file_exists($filePath)) {
        require_once($filePath);
    }
}

spl_autoload_register('google_chart_autoload');

Than i can easy use the classe like this: $stocksTable = new Khill\Lavacharts\Configs\DataTable();

from lavacharts.

kevinkhill avatar kevinkhill commented on May 10, 2024

I was looking into something similar, like how the Symfony autoloader works. I get how that would load all of the Lavacharts classes, but then would I just add a note in the instructions for a composer-less install that users have to also download and include Carbon? I was thinking about refactoring Carbon out of it, but then users would loose the handy Carbon::parse() functionality

from lavacharts.

approached avatar approached commented on May 10, 2024

Carbon is just one file what you need to include.
Like this: require_once '/Carbon/src/Carbon/Carbon.php';

from lavacharts.

kevinkhill avatar kevinkhill commented on May 10, 2024

A fix is coming soon....

from lavacharts.

Related Issues (20)

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.