first commit

This commit is contained in:
2026-03-05 13:07:40 +01:00
commit 64ba0721ee
25709 changed files with 4691006 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
## [1.1.0] - 2019-08-13
### Added
- WPDesk_Tracker_Data_Provider
- WPDesk_Tracker_Interface
- WPDesk_Tracker_Sender
## [1.0.0] - 2019-08-02
### Added
- First version with Helper and Tracker override

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 wpdesk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,22 @@
{
"name": "wpdesk/wp-wpdesk-helper-override",
"authors": [
{
"name": "Krzysiek",
"email": "krzysiek@wpdesk.pl"
}
],
"require": {
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "<7"
},
"autoload": {
"classmap": [
"src"
]
},
"scripts": {
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace WPDesk\Helper;
/**
* @deprecated Do not use. Only for purpose of compatibility with library 1.x version
*
* @package WPDesk\Helper
*/
class HelperAsLibrary
{
public function hooks()
{
do_action('wpdesk_helper_instance');
}
/**
* @return \WPDesk_Tracker
*/
public function get_tracker()
{
return apply_filters('wpdesk_tracker_instance', null);
}
/**
* @return LoggerInterface
*/
public function get_logger()
{
return apply_filters('wpdesk_logger_instance', null);
}
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* WP Desk Tracker
*
* @class WPDESK_Tracker
* @version 1.3.2
* @package WPDESK/Helper
* @category Class
* @author WP Desk
*/
/**
* @deprecated Do not use. Only for purpose of compatibility with library 1.x version
*
* Class WPDesk_Tracker_Factory
*/
class WPDesk_Tracker_Factory
{
/**
* Creates tracker instance.
*
* @param string $basename Plugin basename.
*
* @return WPDesk_Tracker created tracker.
*/
public function create_tracker($basename)
{
return apply_filters('wpdesk_tracker_instance', null);
}
}

View File

@@ -0,0 +1,12 @@
<?php
interface WPDesk_Tracker_Data_Provider {
/**
* Provides data
*
* @return array Data provided to tracker.
*/
public function get_data();
}

View File

@@ -0,0 +1,20 @@
<?php
interface WPDesk_Tracker_Interface {
/**
* Setter for object that sends data.
*
* @param WPDesk_Tracker_Sender $sender Object that can send payloads.
*/
public function set_sender( WPDesk_Tracker_Sender $sender );
/**
* Attach data provider class to tracker
*
* @param WPDesk_Tracker_Data_Provider $provider
*
* @return void
*/
public function add_data_provider( WPDesk_Tracker_Data_Provider $provider );
}

View File

@@ -0,0 +1,15 @@
<?php
interface WPDesk_Tracker_Sender {
/**
* Sends payload to predefined receiver.
*
* @param array $payload Payload to send.
*
* @return array If succeeded. Array containing 'headers', 'body', 'response', 'cookies', 'filename'.
*/
public function send_payload( array $payload );
}