Git Product home page Git Product logo

Comments (18)

machuga avatar machuga commented on June 16, 2024

@dublinan Can you please show me how you're loading the spark?

from php-activerecord-spark.

andredublin avatar andredublin commented on June 16, 2024

I'm loading the spark within the autoload.php file of the config folder.
$autoload['sparks'] = array('php-activerecord/0.0.2');

I've got the MY_Loader.php in the ~/codeigniter/application/core folder.

The spark itself resides within the root of the application
~/codeigniter/sparks/php-activerecord/0.0.2

from php-activerecord-spark.

machuga avatar machuga commented on June 16, 2024

Try loading the spark manually with $this->load->spark('php-activerecord/0.0.2') in the controller you're trying to use it in.

On Jan 18, 2012, at 7:35 AM, Andre Dublin wrote:

I'm loading the spark within the autoload.php file of the config folder.
$autoload['sparks'] = array('php-activerecord/0.0.2');

I've got the MY_Loader.php in the ~/codeigniter/application/core folder.

The spark itself resides within the root of the application
~/codeigniter/sparks/php-activerecord/0.0.2


Reply to this email directly or view it on GitHub:
#8 (comment)

from php-activerecord-spark.

andredublin avatar andredublin commented on June 16, 2024

From the PHP Log File
PHP Fatal error: Call to a member function spark() on a non-object in ~/codeigniter/application/controllers/welcome.php on line 6

What CI tells me

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Welcome::$load

Filename: controllers/welcome.php

Line Number: 6

I'm loading the library within the __construct function

public function __construct()
{
$this->load->spark('php-activerecord/0.0.2');
}

Is there a CI library I should be loading to use the load? Database perhaps? I don't think that would be right....

from php-activerecord-spark.

andredublin avatar andredublin commented on June 16, 2024

Also calling the parent::__construct(); causes my previous error of the ActiveRecord\Model not being found in the user.php model file.

from php-activerecord-spark.

machuga avatar machuga commented on June 16, 2024

This line: "Message: Undefined property: Welcome::$load" makes me feel like
your controller is not extending CI_Controller, as it cannot find the CI
load method.

On Wed, Jan 18, 2012 at 7:59 AM, Andre Dublin <
[email protected]

wrote:

Also calling the parent::__construct(); causes my previous error of the
ActiveRecord\Model not being found in the user.php model file.


Reply to this email directly or view it on GitHub:

#8 (comment)

from php-activerecord-spark.

andredublin avatar andredublin commented on June 16, 2024

it is

class Welcome extends CI_Controller
{
// code...
}

from php-activerecord-spark.

machuga avatar machuga commented on June 16, 2024

As this is not a bug with the library - are you able to continue this
discussion in IRC where I can help you in real time? Myself and a few
other guys using the lib are in there now.

On Wed, Jan 18, 2012 at 8:43 AM, Andre Dublin <
[email protected]

wrote:

it is

class Welcome extends CI_Controller
{
// code...
}


Reply to this email directly or view it on GitHub:

#8 (comment)

from php-activerecord-spark.

andredublin avatar andredublin commented on June 16, 2024

yeah, whats the server/room?

from php-activerecord-spark.

machuga avatar machuga commented on June 16, 2024

irc.freenode.net. #codeigniter

On Wed, Jan 18, 2012 at 8:49 AM, Andre Dublin <
[email protected]

wrote:

yeah, whats the server/room?


Reply to this email directly or view it on GitHub:

#8 (comment)

from php-activerecord-spark.

andredublin avatar andredublin commented on June 16, 2024

thanks for the help!

from php-activerecord-spark.

mogetutu avatar mogetutu commented on June 16, 2024

Hi, so what was the solution to the the bug?

from php-activerecord-spark.

machuga avatar machuga commented on June 16, 2024

If I remember correctly he was simply loading it incorrectly or had case-sensitivity issues with his operating system.

from php-activerecord-spark.

andredublin avatar andredublin commented on June 16, 2024

The problem I had was that I was loading my models in config.php. Which you shouldn't since php activerecord doesn't require you to autoload the models.

from php-activerecord-spark.

mogetutu avatar mogetutu commented on June 16, 2024

Got it working nice tool by all standard, hope it gets into Codeigniter Core alterable with the query builder.

from php-activerecord-spark.

andredublin avatar andredublin commented on June 16, 2024

I hear their working on PDO integration for 3.0

from php-activerecord-spark.

mogetutu avatar mogetutu commented on June 16, 2024

I thought there are some PDO drivers all ready baked in the latest build or are you talking about something else.

from php-activerecord-spark.

andredublin avatar andredublin commented on June 16, 2024

Yeah my bad, meant to say that their updating PDO drivers. Small blurb
here http://codeigniter.com/news/codeigniter_2.1.1_released

On Tue, Jun 19, 2012 at 9:56 AM, mogetutu
[email protected]
wrote:

I thought there are some PDO drivers all ready baked in the latest build or are you talking about something else.


Reply to this email directly or view it on GitHub:
#8 (comment)

from php-activerecord-spark.

Related Issues (12)

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.