<commit_before><?php

namespace Handbid;

use Handbid\Store\StoreInterface;

class Handbid
{

    public $_rest,
        $_auth,
        $_consumerKey,
        $_consumerSecret,
        $_storeCache = [],
        $_storePrefix = 'Handbid\\Store\\';

    /**
     * Include all dependencies
     */
    public static function includeDependencies()
    {
        require __DIR__ . "/Exception/App.php";
        require __DIR__ . "/Exception/Bid.php";
        require __DIR__ . "/Exception/Network.php";

        require __DIR__ . "/Rest/RestInterface.php";
        require __DIR__ . "/Rest/Rest.php";

        require __DIR__ . "/Auth/AuthInterface.php";
        require __DIR__ . "/Auth/Legacy.php";
        require __DIR__ . "/Auth/AppAuth.php";
        require __DIR__ . "/Auth/OAuth.php";
        require __DIR__ . "/Auth/UserXAuth.php";

        //store abstract
        require __DIR__ . "/Store/StoreInterface.php";
        require __DIR__ . "/Store/Legacy/StoreAbstract.php";
        require __DIR__ . "/Store/StoreAbstract.php";

        //org
        require __DIR__ . "/Store/Organization.php";
        require __DIR__ . "/Store/Legacy/Organization.php";


        //auction
        require __DIR__ . "/Store/Auction.php";
        require __DIR__ . "/Store/Legacy/Auction.php";

        //categories
        require __DIR__ . "/Store/TaxonomyTerm.php";
        require __DIR__ . "/Store/ItemCategory.php";
        require __DIR__ . "/Store/Legacy/ItemCategory.php";

        //item
        require __DIR__ . "/Store/Item.php";
        require __DIR__ . "/Store/Legacy/Item.php";


        require __DIR__ . "/Store/Bid.php";
        require __DIR__ . "/Store/Ticket.php";
        require __DIR__ . "/Store/Legacy/Bidder.php";
        require __DIR__ . "/Store/Donor.php";
        require __DIR__ . "/Store/Manager.php";
    }

    /**
     * @param       $consumerKey
     * @param       $consumerSecret
     * @param array $options
     */
    public function __construct($consumerKey, $consumerSecret, $options = [])
    {
        //default support is legacy now
        if (!isset($options['legacy']) || !$options['legacy']) {
            $this->_storePrefix  = 'Handbid\\Store\\Legacy\\';
            $options['endpoint'] = 'https://handbid.com';

        }

        //defaults
        $endpoint = isset($options['endpoint']) ? $options['endpoint'] : 'http://beta.handbid.com';
        $path     = isset($options['path']) ? $options['path'] : '/v1/rest/';

        //build our rest supporting classes
        $this->_rest = isset($options['rest']) ? $options['rest'] : new Rest\Rest($endpoint, $path);
        $auth        = isset($options['auth']) ? $options['auth'] : new Auth\Legacy();

        if ($auth) {
            $this->setAuth($auth);
        }

    }

    /**
     * Set a new auth adapter. See ./Auth/AuthInterface.php for details. Anything you set here is passed through to the
     * REST class.
     *
     * @param Auth\AuthInterface $auth<commit_msg>handbid plugin<commit_after><?php

namespace Handbid;

use Handbid\Store\StoreInterface;

class Handbid
{

    public $_rest,
        $_auth,
        $_consumerKey,
        $_consumerSecret,
        $_storeCache = [],
        $_storePrefix = 'Handbid\\Store\\';

    /**
     * Include all dependencies
     */
    public static function includeDependencies()
    {
        require __DIR__ . "/Exception/App.php";
        require __DIR__ . "/Exception/Bid.php";
        require __DIR__ . "/Exception/Network.php";

        require __DIR__ . "/Rest/RestInterface.php";
        require __DIR__ . "/Rest/Rest.php";

        require __DIR__ . "/Auth/AuthInterface.php";
        require __DIR__ . "/Auth/Legacy.php";
        require __DIR__ . "/Auth/AppAuth.php";
        require __DIR__ . "/Auth/OAuth.php";
        require __DIR__ . "/Auth/UserXAuth.php";

        //store abstract
        require __DIR__ . "/Store/StoreInterface.php";
        require __DIR__ . "/Store/Legacy/StoreAbstract.php";
        require __DIR__ . "/Store/StoreAbstract.php";

        //org
        require __DIR__ . "/Store/Organization.php";
        require __DIR__ . "/Store/Legacy/Organization.php";


        //auction
        require __DIR__ . "/Store/Auction.php";
        require __DIR__ . "/Store/Legacy/Auction.php";

        //categories
        require __DIR__ . "/Store/TaxonomyTerm.php";
        require __DIR__ . "/Store/ItemCategory.php";
        require __DIR__ . "/Store/Legacy/ItemCategory.php";

        //item
        require __DIR__ . "/Store/Item.php";
        require __DIR__ . "/Store/Legacy/Item.php";


        require __DIR__ . "/Store/Bid.php";
        require __DIR__ . "/Store/Ticket.php";
        require __DIR__ . "/Store/Legacy/Bidder.php";
        require __DIR__ . "/Store/Donor.php";
        require __DIR__ . "/Store/Manager.php";
    }

    /**
     * @param       $consumerKey
     * @param       $consumerSecret
     * @param array $options
     */
    public function __construct($consumerKey, $consumerSecret, $options = [])
    {
        //default support is legacy now
        if (!isset($options['legacy']) || !$options['legacy']) {
            $this->_storePrefix  = 'Handbid\\Store\\Legacy\\';
            $options['endpoint'] = 'https://beta.handbid.com';

        }

        //defaults
        $endpoint = isset($options['endpoint']) ? $options['endpoint'] : 'http://beta.handbid.com';
        $path     = isset($options['path']) ? $options['path'] : '/v1/rest/';

        //build our rest supporting classes
        $this->_rest = isset($options['rest']) ? $options['rest'] : new Rest\Rest($endpoint, $path);
        $auth        = isset($options['auth']) ? $options['auth'] : new Auth\Legacy();

        if ($auth) {
            $this->setAuth($auth);
        }

    }

    /**
     * Set a new auth adapter. See ./Auth/AuthInterface.php for details. Anything you set here is passed through to the
     * REST class.
     *
     * @param Auth\AuthInterface $auth
{'fraction_non_alphanumeric': 0.14929624664879357, 'fraction_numerical': 0.0003351206434316354, 'mean_word_length': 2.0469627360898417, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5852069', 'n_tokens_mistral': 1781, 'n_tokens_neox': 1734, 'n_words': 368}