Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7742377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:15:40+00:00 2026-06-01T09:15:40+00:00

I try to extend the CheckfrontAPI class with my new class. In my case

  • 0

I try to extend the CheckfrontAPI class with my new class.

In my case I use the Singleton pattern in order to load only one instance at a time of my class and I get that error

Fatal error: Declaration of CheckFrontIntegrator::store() must be compatible with that of CheckfrontAPI::store() in /home/my_web_site/public_html/wp-content/plugins/checkfront/class/Checkfront_Integration.php on line 83

Any idea on how to solve that issue ?

Here is the CheckfrontAPI source code : https://github.com/Checkfront/PHP-SDK/blob/master/lib/CheckfrontAPI.php

And here is my class that extends that class:

<?php

class CheckFrontIntegrator extends CheckfrontAPI
{
    private static $instance = null;
    public $tmp_file = '.checkfront_oauth';

    final protected function store($data = array())
    {
        $tmp_file = sys_get_temp_dir() . DIRECTORY_SEPARATOR. $this->tmp_file;

        if(count($data))
        {
            file_put_contents(  
                $tmp_file,
                json_encode(
                    $data, 
                    true
                )
            );
        }
        elseif(is_file($tmp_file))
        {
            $data = json_decode(
                trim(
                    file_get_contents(
                        $tmp_file
                    )
                ),
                true
            );
        }

        return $data;
}

    public function session($session_id, $data = array())
    {
        $_SESSION['checkfront']['session_id'] = $session_id;
}

    public static function instance($data)
    {
        if(!isset(self::$instance))
        {
            self::$instance = new CheckFrontIntegrator($data);
        }

        return self::$instance;
    }

    public function __construct($data)
    {
        if(session_id() == '')
        {
            session_start();
        }

        parent::__construct($data, session_id());
    }
}

?>

And I initiate the new instance of that class like that:

$this->checkfront_integrator = CheckFrontIntegrator::instance($args);

where args are all the important information needit by the class to initiate a new object

AFTER EDIT

I have change my method store from:

final protected function store($data = array())
....

to

protected function store($data)
....

and the problem still occure 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:15:41+00:00Added an answer on June 1, 2026 at 9:15 am

    CheckfrontAPI is an abstract class? in this case your CheckFrontIntegrator::store() arguments count must be identical to original declaration

    EDIT

    I see on github

    abstract protected function store($data);
    

    your override must be:

    protected function store($data) {
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting the following error when I try to extend SalatDAO or use grater[T].asObject(x):
Try to see which cast is faster (not necessary better): new c++ case or
I try extend a class from networkx.DiGraph import networkx as nx class branch(nx.DiGraph): def
i realized that if you try to extend the SimpleAdapter class, you must make
i try to work with spinner on dialog public class data extends Dialog {
I created a class where extends from ViewFlipper. When I try to instantiate on
Try as I might I cannot get my head around what the IteratorIterator class
Im a bit confused because FlexUnith 4's behavior. When I use fail() in try-catch
I try to use Richfaces DataTable with DataTableModel to have server side paging and
I have a class that I'm trying to make extend DelayedInit : class Foo

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.