Skip to content

Commit

Permalink
inited
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Apr 20, 2017
0 parents commit f1f28ab
Show file tree
Hide file tree
Showing 10 changed files with 259 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# hidev internals
.hidev/composer.json
.hidev/composer.lock
.hidev/config-local.yml
.hidev/vendor

# IDE & OS files
.*.swp
.DS_Store
.buildpath
.idea
.project
.settings
Thumbs.db
nbproject

# vendor dirs
vendor

# composer lock files
composer.lock

# php-cs-fixer cache
.php_cs.cache

# phpunit generated files
coverage.clover

# Binaries
chkipper.phar
composer.phar
php-cs-fixer.phar
phpunit-skelgen.phar
phpunit.phar
6 changes: 6 additions & 0 deletions .hidev/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package:
type: yii2-extension
name: yii2-yandex-metrika
title: Yandex.Metrika counter for Yii2 applications
headline: Yii2 Yandex.Metrika
keywords: yii2, yandex, metrika
9 changes: 9 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
checks:
php:
code_rating: true
duplication: true
tools:
php_code_coverage:
enabled: true
external_code_coverage:
timeout: 600
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: php
php:
- 5.6
- 7
- 7.1
- hhvm
sudo: false
dist: trusty
matrix:
allow_failures:
-
php: hhvm
cache:
directories:
- $HOME/.composer/cache
before_install:
- 'composer self-update'
- 'composer --version'
- 'wget http://hiqdev.com/hidev/hidev.phar -O hidev.phar && chmod a+x hidev.phar'
- './hidev.phar --version'
- './hidev.phar travis/before_install'
install:
- './hidev.phar travis/install'
script:
- './hidev.phar travis/script'
after_script:
- './hidev.phar travis/after_script'
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Copyright © 2014-2017, HiQDev (http://hiqdev.com/)
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of HiQDev nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Yii2 Yandex.Metrika

**Yandex.Metrika counter for Yii2 applications**

[![Latest Stable Version](https://poser.pugx.org/hiqdev/yii2-yandex-metrika/v/stable)](https://packagist.org/packages/hiqdev/yii2-yandex-metrika)
[![Total Downloads](https://poser.pugx.org/hiqdev/yii2-yandex-metrika/downloads)](https://packagist.org/packages/hiqdev/yii2-yandex-metrika)
[![Build Status](https://img.shields.io/travis/hiqdev/yii2-yandex-metrika.svg)](https://travis-ci.org/hiqdev/yii2-yandex-metrika)
[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/hiqdev/yii2-yandex-metrika.svg)](https://scrutinizer-ci.com/g/hiqdev/yii2-yandex-metrika/)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/hiqdev/yii2-yandex-metrika.svg)](https://scrutinizer-ci.com/g/hiqdev/yii2-yandex-metrika/)

## Installation

The preferred way to install this yii2-extension is through [composer](http://getcomposer.org/download/).

Either run

```sh
php composer.phar require "hiqdev/yii2-yandex-metrika"
```

or add

```json
"hiqdev/yii2-yandex-metrika": "*"
```

to the require section of your composer.json.

## License

This project is released under the terms of the BSD-3-Clause [license](LICENSE).
Read more [here](http://choosealicense.com/licenses/bsd-3-clause).

Copyright © 2014-2017, HiQDev (http://hiqdev.com/)
57 changes: 57 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "hiqdev/yii2-yandex-metrika",
"type": "yii2-extension",
"description": "Yandex.Metrika counter for Yii2 applications",
"keywords": [
"yii2",
"yandex",
"metrika"
],
"homepage": "https://github.com/hiqdev/yii2-yandex-metrika",
"license": "BSD-3-Clause",
"support": {
"email": "support@hiqdev.com",
"source": "https://github.com/hiqdev/yii2-yandex-metrika",
"issues": "https://github.com/hiqdev/yii2-yandex-metrika/issues",
"wiki": "https://github.com/hiqdev/yii2-yandex-metrika/wiki",
"forum": "http://forum.hiqdev.com/"
},
"authors": [
{
"name": "Andrii Vasyliev",
"role": "Project lead",
"email": "sol@hiqdev.com",
"homepage": "http://hipanel.com/"
},
{
"name": "Dmitry Naumenko",
"role": "Lead backend developer",
"email": "d.naumenko.a@gmail.com",
"homepage": "http://silverfire.me/"
},
{
"name": "Andrey Klochok",
"role": "Lead frontend developer",
"email": "andreyklochok@gmail.com",
"homepage": "http://hiqdev.com/"
},
{
"name": "Yuriy Myronchuk",
"role": "QA Lead",
"email": "bladeroot@gmail.com",
"homepage": "http://hiqdev.com/"
}
],
"require": {
"yiisoft/yii2": "~2.0.0"
},
"require-dev": {
"hiqdev/hidev-php": "<2.0",
"hiqdev/hidev-hiqdev": "<2.0"
},
"autoload": {
"psr-4": {
"hiqdev\\yii2\\YandexMetrika\\": "src"
}
}
}
17 changes: 17 additions & 0 deletions src/Component.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace hiqdev\yii2\YandexMetrika;

use yii\base\Application;
use yii\base\BootstrapInterface;

class Component extends \yii\base\Component implements BootstrapInterface
{
public $id;

public $params = [];

public function bootstrap(Application $app)
{
}
}
26 changes: 26 additions & 0 deletions src/config/hisite.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/**
* Health monitoring for Yii2 applications
*
* @link https://github.com/hiqdev/yii2-monitoring
* @package yii2-monitoring
* @license BSD-3-Clause
* @copyright Copyright (c) 2017, HiQDev (http://hiqdev.com/)
*/

if (empty($params['yandex.metrika.id'])) {
return [];
}

return [
'bootstrap' => [
'yandexMetrika' => 'yandexMetrika',
],
'components' => [
'yandexMetrika' => [
'class' => \hiqdev\yii2\YandexMetrika\Component::class,
'id' => $params['yandexMetrika.id'],
'params' => $params['yandexMetrika.params'],
],
],
];
20 changes: 20 additions & 0 deletions src/config/params.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**
* Health monitoring for Yii2 applications
*
* @link https://github.com/hiqdev/yii2-monitoring
* @package yii2-monitoring
* @license BSD-3-Clause
* @copyright Copyright (c) 2017, HiQDev (http://hiqdev.com/)
*/

return [
'yandexMetrika.id' => null,
'yandexMetrika.params' => [
'webvisor' => null,
'trackHash' => null,
'clickmap' => null,
'trackLinks' => null,
'accurateTrackBounce' => null,
],
];

0 comments on commit f1f28ab

Please # to comment.