-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3,339 changed files
with
157,442 additions
and
204,551 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
<?php | ||
|
||
/** | ||
* Piwik - free/libre analytics platform | ||
* | ||
* @link http://piwik.org | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | ||
*/ | ||
|
||
namespace Piwik\Plugins\GoogleAnalyticsImporter; | ||
|
||
|
||
class CannotImportCustomDimensionException extends \Exception | ||
{ | ||
/** | ||
* @var \Google\Service\Analytics\CustomDimension | ||
*/ | ||
private $gaCustomDimension; | ||
|
||
private $reason; | ||
|
||
public function __construct(\Google\Service\Analytics\CustomDimension $gaCustomDimension, $reason) | ||
public function __construct(\Matomo\Dependencies\GoogleAnalyticsImporter\Google\Service\Analytics\CustomDimension $gaCustomDimension, $reason) | ||
{ | ||
parent::__construct("Unable to import the '{$gaCustomDimension->getName()}' custom dimension: $reason."); | ||
parent::__construct("Unable to import the '{$gaCustomDimension->getName()}' custom dimension: {$reason}."); | ||
$this->gaCustomDimension = $gaCustomDimension; | ||
$this->reason = $reason; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
<?php | ||
|
||
/** | ||
* Piwik - free/libre analytics platform | ||
* | ||
* @link http://piwik.org | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | ||
*/ | ||
|
||
namespace Piwik\Plugins\GoogleAnalyticsImporter; | ||
|
||
|
||
class CannotImportCustomDimensionGA4Exception extends \Exception | ||
{ | ||
/** | ||
* @var \Google\Analytics\Admin\V1alpha\CustomDimension | ||
*/ | ||
private $gaCustomDimension; | ||
|
||
private $reason; | ||
|
||
public function __construct(\Google\Analytics\Admin\V1alpha\CustomDimension $gaCustomDimension, $reason) | ||
public function __construct(\Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\CustomDimension $gaCustomDimension, $reason) | ||
{ | ||
parent::__construct("Unable to import the '{$gaCustomDimension->getDisplayName()}' custom dimension: $reason."); | ||
parent::__construct("Unable to import the '{$gaCustomDimension->getDisplayName()}' custom dimension: {$reason}."); | ||
$this->gaCustomDimension = $gaCustomDimension; | ||
$this->reason = $reason; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,29 @@ | ||
<?php | ||
|
||
/** | ||
* Piwik - free/libre analytics platform | ||
* | ||
* @link http://piwik.org | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | ||
*/ | ||
|
||
namespace Piwik\Plugins\GoogleAnalyticsImporter; | ||
|
||
|
||
class CannotImportGoalException extends \Exception | ||
{ | ||
/** | ||
* @var \Google\Service\Analytics\Goal | ||
*/ | ||
private $gaGoal; | ||
|
||
private $reason; | ||
|
||
/** | ||
* CannotImportGoalException constructor. | ||
* @param \Google\Service\Analytics\Goal $gaGoal | ||
* @param string $string | ||
*/ | ||
public function __construct(\Google\Service\Analytics\Goal $gaGoal, $reason) | ||
public function __construct(\Matomo\Dependencies\GoogleAnalyticsImporter\Google\Service\Analytics\Goal $gaGoal, $reason) | ||
{ | ||
parent::__construct("Unable to import the '{$gaGoal->getName()}' goal: $reason."); | ||
parent::__construct("Unable to import the '{$gaGoal->getName()}' goal: {$reason}."); | ||
$this->gaGoal = $gaGoal; | ||
$this->reason = $reason; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
<?php | ||
|
||
/** | ||
* Piwik - free/libre analytics platform | ||
* | ||
* @link http://piwik.org | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | ||
*/ | ||
|
||
namespace Piwik\Plugins\GoogleAnalyticsImporter; | ||
|
||
|
||
class CannotProcessImportException extends \Exception | ||
{ | ||
public function __construct($message) | ||
{ | ||
parent::__construct($message); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,45 @@ | ||
<?php | ||
|
||
/** | ||
* Piwik - free/libre analytics platform | ||
* | ||
* @link https://matomo.org | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | ||
*/ | ||
|
||
namespace Piwik\Plugins\GoogleAnalyticsImporter\Commands; | ||
|
||
use Piwik\Container\StaticContainer; | ||
use Piwik\Plugin\ConsoleCommand; | ||
use Piwik\Plugins\GoogleAnalyticsImporter\ImportStatus; | ||
use Piwik\Plugins\GoogleAnalyticsImporter\Logger\LogToSingleFileProcessor; | ||
use Piwik\Plugins\GoogleAnalyticsImporter\Tasks; | ||
|
||
class ArchiveImportedData extends ConsoleCommand | ||
{ | ||
protected function configure() | ||
{ | ||
$this->setName('googleanalyticsimporter:archive-imported-data'); | ||
$this->setDescription('Initiates core:archive for an imported site. This is run automatically every day, but can be run manually if needed.' | ||
. ' All it really does is call core:archive w/ a few custom parameters so data from years back gets archived.'); | ||
$this->setDescription('Initiates core:archive for an imported site. This is run automatically every day, but can be run manually if needed.' . ' All it really does is call core:archive w/ a few custom parameters so data from years back gets archived.'); | ||
$this->addRequiredValueOption('idSite', null, 'The ID of the imported site to initiate archiving for.'); | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
protected function doExecute(): int | ||
protected function doExecute() : int | ||
{ | ||
$input = $this->getInput(); | ||
$output = $this->getOutput(); | ||
$idSite = (int) $input->getOption('idSite'); | ||
|
||
LogToSingleFileProcessor::handleLogToSingleFileInCliCommand($idSite); | ||
|
||
$importStatus = StaticContainer::get(ImportStatus::class); | ||
|
||
try { | ||
$status = $importStatus->getImportStatus($idSite); | ||
} catch (\Exception $ex) { | ||
$output->writeln(LogToSingleFileProcessor::$cliOutputPrefix . "No import found for site ID = $idSite."); | ||
$output->writeln(LogToSingleFileProcessor::$cliOutputPrefix . "No import found for site ID = {$idSite}."); | ||
return self::FAILURE; | ||
} | ||
|
||
$output->writeln(LogToSingleFileProcessor::$cliOutputPrefix . "Starting core:archive for site ID = $idSite."); | ||
|
||
Tasks::startArchive($status, $wait = true); | ||
|
||
$output->writeln(LogToSingleFileProcessor::$cliOutputPrefix . "Starting core:archive for site ID = {$idSite}."); | ||
Tasks::startArchive($status, $wait = \true); | ||
$output->writeln(LogToSingleFileProcessor::$cliOutputPrefix . "Done."); | ||
|
||
return self::SUCCESS; | ||
} | ||
} |
Oops, something went wrong.