This repository has been archived by the owner on Jan 31, 2020. It is now read-only.
-
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.
Merging develop to master in preparation for 2.6.0.
- Loading branch information
Showing
21 changed files
with
618 additions
and
407 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ | |
.*.sw* | ||
.*.un~ | ||
nbproject | ||
doc/html/ | ||
tmp/ | ||
zf-mkdoc-theme/ | ||
|
||
clover.xml | ||
composer.lock | ||
|
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 |
---|---|---|
|
@@ -10,20 +10,44 @@ branches: | |
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
- $HOME/.local | ||
- zf-mkdoc-theme | ||
|
||
env: | ||
global: | ||
- SITE_URL: https://zendframework.github.io/zend-tag | ||
- GH_USER_NAME: "Matthew Weier O'Phinney" | ||
- GH_USER_EMAIL: [email protected] | ||
- GH_REF: github.com/zendframework/zend-tag.git | ||
- secure: "S3bpXlpY3uBhHXbfvInuHEfcD62cQsKgA0KWzOMhrEsyUvlUYceGUAEpX4ll9ZR9MR0rDKNPYFOlAOFX32P9gomK9laRdbWfy6CV0Qb/uPjPuq/8dx6fvTiNrGSt00Qs+fQikOs12v+P3IGwX8wuJLd30zjhuSRA8leQzF1gsbfUhSkTy6P+FkuqvCdw1uFflBje/88bWvv9s+vfB094LSN0iSmF3QU1RquGCStcwXC7nUuwKceTwjJ6HmXbvMT2cq2Gn4EQG+1ytKZICxXQ8NM+tWFhNPPRO0EMIu6EFi5825zeT/9AhbxhGJnnwfDU6hvbmcqdJnLO5LTBAzXg5XDUw/LSvSQp/4toSfpmuyVtBlnUFUsMjjS31K5kwegbtjHjuLOr7rKTGZbqAvYzAHFOnFDqSjwQhEgD43+ah8b58qzmtXN/iCH/rDS1XQ+BR1XrUJpQy308/Vqb0uVnSFAj/HH/BlIKFscDMxQhbZy9j6rJgvltIC3OCCDsor34mZC0lb0mK+OW9bL+FFySSkvLO5FI0idHn5K6wevT82x9fAA7sAoAJvmxKeAYqXZY360DLVfGsvXhxKUIeU1q59Rrxzix5i8MCiokb2tjFQfd0G2FxcaHehnnBu0GxAGSEu0ClJIXQzxp3Q9jNHHG2Ntm90E9nt55Fh2Z138W0qQ=" | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: 5.5 | ||
env: | ||
- EXECUTE_CS_CHECK=true | ||
- php: 5.5 | ||
env: | ||
- SERVICE_MANAGER_VERSION='^2.7.5' | ||
- php: 5.6 | ||
env: | ||
- EXECUTE_TEST_COVERALLS=true | ||
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)" | ||
- PATH="$HOME/.local/bin:$PATH" | ||
- php: 5.6 | ||
env: | ||
- SERVICE_MANAGER_VERSION='^2.7.5' | ||
- php: 7 | ||
- php: hhvm | ||
allow_failures: | ||
- php: 7 | ||
env: | ||
- SERVICE_MANAGER_VERSION='^2.7.5' | ||
- php: hhvm | ||
- php: hhvm | ||
env: | ||
- SERVICE_MANAGER_VERSION='^2.7.5' | ||
allow_failures: | ||
- php: hhvm | ||
|
||
notifications: | ||
irc: "irc.freenode.org#zftalk.dev" | ||
|
@@ -33,6 +57,8 @@ before_install: | |
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi | ||
- composer self-update | ||
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi | ||
- if [[ $SERVICE_MANAGER_VERSION != '' ]]; then composer require --dev --no-update "zendframework/zend-servicemanager:$SERVICE_MANAGER_VERSION" ; fi | ||
- if [[ $SERVICE_MANAGER_VERSION == '' ]]; then composer require --dev --no-update "zendframework/zend-servicemanager:^3.0.3" ; fi | ||
|
||
install: | ||
- travis_retry composer install --no-interaction --ignore-platform-reqs | ||
|
@@ -41,6 +67,10 @@ script: | |
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi | ||
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi | ||
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi | ||
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi | ||
|
||
after_success: | ||
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi | ||
|
||
after_script: | ||
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file, in reverse chronological order by release. | ||
|
||
## 2.6.0 - 2016-02-03 | ||
|
||
### Added | ||
|
||
- [#11](https://github.com/zendframework/zend-tag/pull/11) adds documentation | ||
and publishes it to https://zendframework.github.io/zend-tag/ | ||
|
||
### Deprecated | ||
|
||
- Nothing. | ||
|
||
### Removed | ||
|
||
- Nothing. | ||
|
||
### Fixed | ||
|
||
- [#3](https://github.com/zendframework/zend-tag/pull/3) and | ||
[#10](https://github.com/zendframework/zend-tag/pull/10) update the component | ||
to be forward-compatible with zend-servicemanager v3. |
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div class="container"> | ||
<div class="jumbotron"> | ||
<h1>zend-tag</h1> | ||
|
||
<p>Manipulate and weight taggable items, and create tag clouds.</p> | ||
|
||
<pre><code class="language-bash">$ composer require zendframework/zend-tag</code></pre> | ||
</div> | ||
</div> | ||
|
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../README.md |
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Introduction and Quick Start | ||
|
||
zend-tag provides the ability to work with taggable items. At its foundation, it | ||
provides two classes to work with tags, `Zend\Tag\Item` and `Zend\Tag\ItemList`. | ||
Additionally, it comes with the interface `Zend\Tag\TaggableInterface`, which | ||
allows you to use any of your models as a taggable item in conjunction with the | ||
component. | ||
|
||
`Zend\Tag\Item` provides the essential functionality required to work with all | ||
other functionality within the component. A taggable item always consists of a | ||
title and a relative weight (e.g. number of occurrences). It also stores | ||
parameters which are used by the different sub-components. | ||
|
||
`Zend\Tag\ItemList` exists to group multiple items together as an array | ||
iterator, and provides additional functionality to calculate absolute weight | ||
values based on the given relative weights of each item in it. | ||
|
||
## Quick Start | ||
|
||
This example illustrates how to create a list of tags and spread absolute weight | ||
values over them. | ||
|
||
```php | ||
// Create the item list | ||
$list = new Zend\Tag\ItemList(); | ||
|
||
// Assign tags to it | ||
$list[] = new Zend\Tag\Item(['title' => 'Code', 'weight' => 50]); | ||
$list[] = new Zend\Tag\Item(['title' => 'Zend Framework', 'weight' => 1]); | ||
$list[] = new Zend\Tag\Item(['title' => 'PHP', 'weight' => 5]); | ||
|
||
// Spread absolute values on the items | ||
$list->spreadWeightValues([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); | ||
|
||
// Output the items with their absolute values | ||
foreach ($list as $item) { | ||
printf("%s: %d\n", $item->getTitle(), $item->getParam('weightValue')); | ||
} | ||
``` | ||
|
||
This will output the three items "Code", "Zend Framework", and "PHP", with the | ||
absolute values 10, 1 and 2: | ||
|
||
``` | ||
Code: 10 | ||
Zend Framework: 1 | ||
PHP: 2 | ||
``` |
Oops, something went wrong.