mirror of
https://github.com/danpros/htmly.git
synced 2026-04-19 20:16:22 +05:30
[CLEANUP] move plugin urilfy to composer setup
This commit is contained in:
parent
bf5fe94861
commit
5955ec2007
52 changed files with 780 additions and 6560 deletions
|
|
@ -1,13 +1,17 @@
|
|||
{
|
||||
"config": {
|
||||
"vendor-dir": "system/vendor/",
|
||||
"optimize-autoloader": true
|
||||
"optimize-autoloader": true,
|
||||
"platform": {
|
||||
"php": "5.3"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"ircmaxell/password-compat": "^1.0",
|
||||
"michelf/php-markdown": "^1.5",
|
||||
"suin/php-rss-writer": "^1.3",
|
||||
"kanti/hub-updater": "^0.4.0"
|
||||
"ircmaxell/password-compat": "1.*",
|
||||
"michelf/php-markdown": "1.*",
|
||||
"suin/php-rss-writer": "1.*",
|
||||
"kanti/hub-updater": "0.*",
|
||||
"jbroadway/urlify": "^1.0"
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
|
|
@ -15,8 +19,7 @@
|
|||
"system/includes/functions.php",
|
||||
"system/admin/admin.php",
|
||||
"system/includes/session.php",
|
||||
"system/includes/opml.php",
|
||||
"system/plugins/urlify/URLify.php"
|
||||
"system/includes/opml.php"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
73
composer.lock
generated
73
composer.lock
generated
|
|
@ -4,8 +4,8 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "5bdfc8dcf4f971b8f61fd8439dd9cbdb",
|
||||
"content-hash": "e98ae62bcc711211dfb7c7c70e7fdfc7",
|
||||
"hash": "4b4af0298a863441fda250d818d3fc4b",
|
||||
"content-hash": "250bd035a1d26dd3e3e01e504833c798",
|
||||
"packages": [
|
||||
{
|
||||
"name": "ircmaxell/password-compat",
|
||||
|
|
@ -49,6 +49,60 @@
|
|||
],
|
||||
"time": "2014-11-20 16:49:30"
|
||||
},
|
||||
{
|
||||
"name": "jbroadway/urlify",
|
||||
"version": "1.0.8-stable",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jbroadway/urlify.git",
|
||||
"reference": "984c991881501098eafdc41053b243237191cff8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jbroadway/urlify/zipball/984c991881501098eafdc41053b243237191cff8",
|
||||
"reference": "984c991881501098eafdc41053b243237191cff8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"URLify": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Johnny Broadway",
|
||||
"email": "johnny@johnnybroadway.com",
|
||||
"homepage": "http://www.johnnybroadway.com/"
|
||||
}
|
||||
],
|
||||
"description": "PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.",
|
||||
"homepage": "https://github.com/jbroadway/urlify",
|
||||
"keywords": [
|
||||
"encode",
|
||||
"iconv",
|
||||
"link",
|
||||
"slug",
|
||||
"translit",
|
||||
"transliterate",
|
||||
"transliteration",
|
||||
"url",
|
||||
"urlify"
|
||||
],
|
||||
"time": "2016-07-27 15:26:43"
|
||||
},
|
||||
{
|
||||
"name": "kanti/hub-updater",
|
||||
"version": "v0.4.1",
|
||||
|
|
@ -146,16 +200,16 @@
|
|||
},
|
||||
{
|
||||
"name": "suin/php-rss-writer",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/suin/php-rss-writer.git",
|
||||
"reference": "96ff59575442dbe23e15fe7ff56d0bf27486cff9"
|
||||
"reference": "51840d2fad4087a4bdd93fb6937aa4b324b5c94f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/suin/php-rss-writer/zipball/96ff59575442dbe23e15fe7ff56d0bf27486cff9",
|
||||
"reference": "96ff59575442dbe23e15fe7ff56d0bf27486cff9",
|
||||
"url": "https://api.github.com/repos/suin/php-rss-writer/zipball/51840d2fad4087a4bdd93fb6937aa4b324b5c94f",
|
||||
"reference": "51840d2fad4087a4bdd93fb6937aa4b324b5c94f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -186,7 +240,7 @@
|
|||
"rss",
|
||||
"writer"
|
||||
],
|
||||
"time": "2015-08-21 06:24:39"
|
||||
"time": "2016-03-01 12:09:17"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
|
|
@ -196,5 +250,8 @@
|
|||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": []
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "5.3"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
144
config/config.ini
Normal file
144
config/config.ini
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
; The URL of your blog. Include the http or https if you are using Facebook or Disqus comment.
|
||||
site.url = ""
|
||||
|
||||
; Your timezone
|
||||
timezone = "Asia/Jakarta"
|
||||
|
||||
; Blog info
|
||||
blog.title = "HTMLy"
|
||||
blog.tagline = "Just another HTMLy blog"
|
||||
blog.description = "Proudly powered by HTMLy, a databaseless blogging platform."
|
||||
blog.copyright = "(c) Your name."
|
||||
|
||||
; Set permalink type. "default" using /year/month/title. "post" using /post/title
|
||||
permalink.type = "default"
|
||||
|
||||
; Make the frontpage static. Options "false" and "true"
|
||||
static.frontpage = "false"
|
||||
|
||||
; Show the /blog url as the blog homepage. Options "false" and "true"
|
||||
blog.enable = "false"
|
||||
|
||||
; Social account
|
||||
social.twitter = "https://twitter.com"
|
||||
social.facebook = "https://www.facebook.com"
|
||||
social.google = "https://plus.google.com"
|
||||
social.tumblr = "http://www.tumblr.com"
|
||||
|
||||
; Custom menu link.
|
||||
; See example below:
|
||||
; "Google->http://www.google.com|Wikipedia->http://www.wikipedia.org".
|
||||
blog.menu = ""
|
||||
|
||||
; Breadcrumb home text. Useful when installed on subfolder.
|
||||
breadcrumb.home = "Home"
|
||||
|
||||
; Comment system. Choose "facebook", "disqus", or "disable".
|
||||
comment.system = "disable"
|
||||
|
||||
; Facebook comments
|
||||
fb.appid = ""
|
||||
fb.num = "5"
|
||||
fb.color = "light"
|
||||
|
||||
; Disqus comments
|
||||
disqus.shortname = ""
|
||||
|
||||
; Google Web Master Tool ID verification
|
||||
google.wmt.id = ""
|
||||
|
||||
; Google+ publisher
|
||||
google.publisher = ""
|
||||
|
||||
; Google analytics
|
||||
google.analytics.id = ""
|
||||
|
||||
; Google reCaptcha
|
||||
; https://www.google.com/recaptcha/admin. Options "false" and "true"
|
||||
|
||||
google.reCaptcha = "false"
|
||||
google.reCaptcha.public = ""
|
||||
google.reCaptcha.private = ""
|
||||
|
||||
; Pagination, RSS, and JSON
|
||||
posts.perpage = "10"
|
||||
category.perpage = "10"
|
||||
tag.perpage = "10"
|
||||
archive.perpage = "10"
|
||||
search.perpage = "10"
|
||||
profile.perpage = "10"
|
||||
type.perpage = "10"
|
||||
json.count = "10"
|
||||
|
||||
; Category info
|
||||
category.info = "true"
|
||||
|
||||
; Related posts
|
||||
related.count = "3"
|
||||
|
||||
; Recent posts
|
||||
recent.count = "5"
|
||||
|
||||
; Popular posts
|
||||
popular.count = "5"
|
||||
|
||||
; Author info on blog post. Set "true" or "false".
|
||||
author.info = "true"
|
||||
|
||||
; Teaser type: set "trimmed" or "full".
|
||||
teaser.type = "full"
|
||||
|
||||
; Read more link text for "full" teaser type
|
||||
read.more = "Read more"
|
||||
|
||||
; Teaser character count
|
||||
teaser.char = "200"
|
||||
|
||||
; Description character count
|
||||
description.char = "150"
|
||||
|
||||
; RSS feed count
|
||||
rss.count = "10"
|
||||
|
||||
; RSS feed description length. If left empty we will use full page.
|
||||
rss.char = "200"
|
||||
|
||||
; Enable image thumbnail on teaser, the options is "true" and "false". If set to "true", you can specify the default thumbnail also.
|
||||
img.thumbnail = "false"
|
||||
default.thumbnail = ""
|
||||
|
||||
; Enable views Counter, the options is "true" and "false". If set to "true", you can see the Counts in Admin page and popular posts.
|
||||
views.counter = "false"
|
||||
|
||||
; Sitemap priorities between "0.0" and "1.0". Set "false" to disable a sitemap for the given type. (See /sitemap.xml)
|
||||
sitemap.priority.base = "1.0"
|
||||
sitemap.priority.post = "0.5"
|
||||
sitemap.priority.static = "0.5"
|
||||
sitemap.priority.category = "0.5"
|
||||
sitemap.priority.tag = "0.5"
|
||||
sitemap.priority.archiveDay = "0.5"
|
||||
sitemap.priority.archiveMonth = "0.5"
|
||||
sitemap.priority.archiveYear = "0.5"
|
||||
sitemap.priority.author = "0.5"
|
||||
sitemap.priority.type = "0.5"
|
||||
|
||||
; Also install pre-release
|
||||
prerelease = "false"
|
||||
|
||||
; Cache expiration in hour. Eg. "6", "12". Default 6 hours.
|
||||
cache.expiration = "6"
|
||||
|
||||
; Switch on and off the file cache for development purposes. Options "false" and "true"
|
||||
cache.off = "false"
|
||||
|
||||
; Switch on and off the page generation time. Options "false" and "true"
|
||||
generation.time = "false"
|
||||
|
||||
; Switch on and off the cache timestamp. Options "false" and "true"
|
||||
cache.timestamp = "false"
|
||||
|
||||
; Set the theme here
|
||||
views.root = "themes/twentysixteen"
|
||||
|
||||
; Framework config. No need to edit.
|
||||
views.layout = "layout"
|
||||
9
config/users/kanti.ini
Normal file
9
config/users/kanti.ini
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
;Password
|
||||
password = yourpassword
|
||||
encryption = clear
|
||||
; encryption: not set, leave blank or set to clear or none to use plain text password for the user,
|
||||
; else set to encryption algoritm supported by hash function of php to use the selected
|
||||
; encryption
|
||||
|
||||
;Role
|
||||
role = admin
|
||||
|
|
@ -1,268 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* A PHP port of URLify.js from the Django project
|
||||
* (https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/urlify.js).
|
||||
* Handles symbols from Latin languages, Greek, Turkish, Bulgarian, Russian,
|
||||
* Ukrainian, Czech, Polish, Romanian, Latvian, Lithuanian, Vietnamese, Arabic,
|
||||
* Serbian, Azerbaijani, and Slovakian. Symbols it cannot transliterate
|
||||
* it will simply omit.
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* echo URLify::filter (' J\'étudie le français ');
|
||||
* // "jetudie-le-francais"
|
||||
*
|
||||
* echo URLify::filter ('Lo siento, no hablo español.');
|
||||
* // "lo-siento-no-hablo-espanol"
|
||||
*/
|
||||
class URLify {
|
||||
public static $maps = array (
|
||||
'de' => array ( /* German */
|
||||
'Ä' => 'Ae', 'Ö' => 'Oe', 'Ü' => 'Ue', 'ä' => 'ae', 'ö' => 'oe', 'ü' => 'ue', 'ß' => 'ss',
|
||||
'ẞ' => 'SS'
|
||||
),
|
||||
'latin' => array (
|
||||
'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A','Ă' => 'A', 'Æ' => 'AE', 'Ç' =>
|
||||
'C', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I',
|
||||
'Ï' => 'I', 'Ð' => 'D', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' =>
|
||||
'O', 'Ő' => 'O', 'Ø' => 'O','Ș' => 'S','Ț' => 'T', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ű' => 'U',
|
||||
'Ý' => 'Y', 'Þ' => 'TH', 'ß' => 'ss', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' =>
|
||||
'a', 'å' => 'a', 'ă' => 'a', 'æ' => 'ae', 'ç' => 'c', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e',
|
||||
'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', 'ð' => 'd', 'ñ' => 'n', 'ò' => 'o', 'ó' =>
|
||||
'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'o', 'ő' => 'o', 'ø' => 'o', 'ș' => 's', 'ț' => 't', 'ù' => 'u', 'ú' => 'u',
|
||||
'û' => 'u', 'ü' => 'u', 'ű' => 'u', 'ý' => 'y', 'þ' => 'th', 'ÿ' => 'y'
|
||||
),
|
||||
'latin_symbols' => array (
|
||||
'©' => '(c)'
|
||||
),
|
||||
'el' => array ( /* Greek */
|
||||
'α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', 'ζ' => 'z', 'η' => 'h', 'θ' => '8',
|
||||
'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => '3', 'ο' => 'o', 'π' => 'p',
|
||||
'ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'y', 'φ' => 'f', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'w',
|
||||
'ά' => 'a', 'έ' => 'e', 'ί' => 'i', 'ό' => 'o', 'ύ' => 'y', 'ή' => 'h', 'ώ' => 'w', 'ς' => 's',
|
||||
'ϊ' => 'i', 'ΰ' => 'y', 'ϋ' => 'y', 'ΐ' => 'i',
|
||||
'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'H', 'Θ' => '8',
|
||||
'Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => '3', 'Ο' => 'O', 'Π' => 'P',
|
||||
'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'F', 'Χ' => 'X', 'Ψ' => 'PS', 'Ω' => 'W',
|
||||
'Ά' => 'A', 'Έ' => 'E', 'Ί' => 'I', 'Ό' => 'O', 'Ύ' => 'Y', 'Ή' => 'H', 'Ώ' => 'W', 'Ϊ' => 'I',
|
||||
'Ϋ' => 'Y'
|
||||
),
|
||||
'tr' => array ( /* Turkish */
|
||||
'ş' => 's', 'Ş' => 'S', 'ı' => 'i', 'İ' => 'I', 'ç' => 'c', 'Ç' => 'C', 'ü' => 'u', 'Ü' => 'U',
|
||||
'ö' => 'o', 'Ö' => 'O', 'ğ' => 'g', 'Ğ' => 'G'
|
||||
),
|
||||
'bg' => array( /* Bulgarian */
|
||||
"Щ" => 'Sht', "Ш" => 'Sh', "Ч" => 'Ch', "Ц" => 'C', "Ю" => 'Yu', "Я" => 'Ya',
|
||||
"Ж" => 'J', "А" => 'A', "Б" => 'B', "В" => 'V', "Г" => 'G', "Д" => 'D',
|
||||
"Е" => 'E', "З" => 'Z', "И" => 'I', "Й" => 'Y', "К" => 'K', "Л" => 'L',
|
||||
"М" => 'M', "Н" => 'N', "О" => 'O', "П" => 'P', "Р" => 'R', "С" => 'S',
|
||||
"Т" => 'T', "У" => 'U', "Ф" => 'F', "Х" => 'H', "Ь" => '', "Ъ" => 'A',
|
||||
"щ" => 'sht', "ш" => 'sh', "ч" => 'ch', "ц" => 'c', "ю" => 'yu', "я" => 'ya',
|
||||
"ж" => 'j', "а" => 'a', "б" => 'b', "в" => 'v', "г" => 'g', "д" => 'd',
|
||||
"е" => 'e', "з" => 'z', "и" => 'i', "й" => 'y', "к" => 'k', "л" => 'l',
|
||||
"м" => 'm', "н" => 'n', "о" => 'o', "п" => 'p', "р" => 'r', "с" => 's',
|
||||
"т" => 't', "у" => 'u', "ф" => 'f', "х" => 'h', "ь" => '', "ъ" => 'a'
|
||||
),
|
||||
'ru' => array ( /* Russian */
|
||||
'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'е' => 'e', 'ё' => 'yo', 'ж' => 'zh',
|
||||
'з' => 'z', 'и' => 'i', 'й' => 'j', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o',
|
||||
'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c',
|
||||
'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sh', 'ъ' => '', 'ы' => 'y', 'ь' => '', 'э' => 'e', 'ю' => 'yu',
|
||||
'я' => 'ya',
|
||||
'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'Yo', 'Ж' => 'Zh',
|
||||
'З' => 'Z', 'И' => 'I', 'Й' => 'J', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O',
|
||||
'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C',
|
||||
'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sh', 'Ъ' => '', 'Ы' => 'Y', 'Ь' => '', 'Э' => 'E', 'Ю' => 'Yu',
|
||||
'Я' => 'Ya',
|
||||
'№' => 'No'
|
||||
),
|
||||
'uk' => array ( /* Ukrainian */
|
||||
'Є' => 'Ye', 'І' => 'I', 'Ї' => 'Yi', 'Ґ' => 'G', 'є' => 'ye', 'і' => 'i', 'ї' => 'yi', 'ґ' => 'g'
|
||||
),
|
||||
'cs' => array ( /* Czech */
|
||||
'č' => 'c', 'ď' => 'd', 'ě' => 'e', 'ň' => 'n', 'ř' => 'r', 'š' => 's', 'ť' => 't', 'ů' => 'u',
|
||||
'ž' => 'z', 'Č' => 'C', 'Ď' => 'D', 'Ě' => 'E', 'Ň' => 'N', 'Ř' => 'R', 'Š' => 'S', 'Ť' => 'T',
|
||||
'Ů' => 'U', 'Ž' => 'Z'
|
||||
),
|
||||
'pl' => array ( /* Polish */
|
||||
'ą' => 'a', 'ć' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n', 'ó' => 'o', 'ś' => 's', 'ź' => 'z',
|
||||
'ż' => 'z', 'Ą' => 'A', 'Ć' => 'C', 'Ę' => 'e', 'Ł' => 'L', 'Ń' => 'N', 'Ó' => 'O', 'Ś' => 'S',
|
||||
'Ź' => 'Z', 'Ż' => 'Z'
|
||||
),
|
||||
'ro' => array ( /* Romanian */
|
||||
'ă' => 'a', 'â' => 'a', 'î' => 'i', 'ș' => 's', 'ț' => 't', 'Ţ' => 'T', 'ţ' => 't'
|
||||
),
|
||||
'lv' => array ( /* Latvian */
|
||||
'ā' => 'a', 'č' => 'c', 'ē' => 'e', 'ģ' => 'g', 'ī' => 'i', 'ķ' => 'k', 'ļ' => 'l', 'ņ' => 'n',
|
||||
'š' => 's', 'ū' => 'u', 'ž' => 'z', 'Ā' => 'A', 'Č' => 'C', 'Ē' => 'E', 'Ģ' => 'G', 'Ī' => 'i',
|
||||
'Ķ' => 'k', 'Ļ' => 'L', 'Ņ' => 'N', 'Š' => 'S', 'Ū' => 'u', 'Ž' => 'Z'
|
||||
),
|
||||
'lt' => array ( /* Lithuanian */
|
||||
'ą' => 'a', 'č' => 'c', 'ę' => 'e', 'ė' => 'e', 'į' => 'i', 'š' => 's', 'ų' => 'u', 'ū' => 'u', 'ž' => 'z',
|
||||
'Ą' => 'A', 'Č' => 'C', 'Ę' => 'E', 'Ė' => 'E', 'Į' => 'I', 'Š' => 'S', 'Ų' => 'U', 'Ū' => 'U', 'Ž' => 'Z'
|
||||
),
|
||||
'vn' => array ( /* Vietnamese */
|
||||
'Á' => 'A', 'À' => 'A', 'Ả' => 'A', 'Ã' => 'A', 'Ạ' => 'A', 'Ă' => 'A', 'Ắ' => 'A', 'Ằ' => 'A', 'Ẳ' => 'A', 'Ẵ' => 'A', 'Ặ' => 'A', 'Â' => 'A', 'Ấ' => 'A', 'Ầ' => 'A', 'Ẩ' => 'A', 'Ẫ' => 'A', 'Ậ' => 'A',
|
||||
'á' => 'a', 'à' => 'a', 'ả' => 'a', 'ã' => 'a', 'ạ' => 'a', 'ă' => 'a', 'ắ' => 'a', 'ằ' => 'a', 'ẳ' => 'a', 'ẵ' => 'a', 'ặ' => 'a', 'â' => 'a', 'ấ' => 'a', 'ầ' => 'a', 'ẩ' => 'a', 'ẫ' => 'a', 'ậ' => 'a',
|
||||
'É' => 'E', 'È' => 'E', 'Ẻ' => 'E', 'Ẽ' => 'E', 'Ẹ' => 'E', 'Ê' => 'E', 'Ế' => 'E', 'Ề' => 'E', 'Ể' => 'E', 'Ễ' => 'E', 'Ệ' => 'E',
|
||||
'é' => 'e', 'è' => 'e', 'ẻ' => 'e', 'ẽ' => 'e', 'ẹ' => 'e', 'ê' => 'e', 'ế' => 'e', 'ề' => 'e', 'ể' => 'e', 'ễ' => 'e', 'ệ' => 'e',
|
||||
'Í' => 'I', 'Ì' => 'I', 'Ỉ' => 'I', 'Ĩ' => 'I', 'Ị' => 'I', 'í' => 'i', 'ì' => 'i', 'ỉ' => 'i', 'ĩ' => 'i', 'ị' => 'i',
|
||||
'Ó' => 'O', 'Ò' => 'O', 'Ỏ' => 'O', 'Õ' => 'O', 'Ọ' => 'O', 'Ô' => 'O', 'Ố' => 'O', 'Ồ' => 'O', 'Ổ' => 'O', 'Ỗ' => 'O', 'Ộ' => 'O', 'Ơ' => 'O', 'Ớ' => 'O', 'Ờ' => 'O', 'Ở' => 'O', 'Ỡ' => 'O', 'Ợ' => 'O',
|
||||
'ó' => 'o', 'ò' => 'o', 'ỏ' => 'o', 'õ' => 'o', 'ọ' => 'o', 'ô' => 'o', 'ố' => 'o', 'ồ' => 'o', 'ổ' => 'o', 'ỗ' => 'o', 'ộ' => 'o', 'ơ' => 'o', 'ớ' => 'o', 'ờ' => 'o', 'ở' => 'o', 'ỡ' => 'o', 'ợ' => 'o',
|
||||
'Ú' => 'U', 'Ù' => 'U', 'Ủ' => 'U', 'Ũ' => 'U', 'Ụ' => 'U', 'Ư' => 'U', 'Ứ' => 'U', 'Ừ' => 'U', 'Ử' => 'U', 'Ữ' => 'U', 'Ự' => 'U',
|
||||
'ú' => 'u', 'ù' => 'u', 'ủ' => 'u', 'ũ' => 'u', 'ụ' => 'u', 'ư' => 'u', 'ứ' => 'u', 'ừ' => 'u', 'ử' => 'u', 'ữ' => 'u', 'ự' => 'u',
|
||||
'Ý' => 'Y', 'Ỳ' => 'Y', 'Ỷ' => 'Y', 'Ỹ' => 'Y', 'Ỵ' => 'Y', 'ý' => 'y', 'ỳ' => 'y', 'ỷ' => 'y', 'ỹ' => 'y', 'ỵ' => 'y',
|
||||
'Đ' => 'D', 'đ' => 'd'
|
||||
),
|
||||
'sr' => array ( /* Serbian */
|
||||
'ђ' => 'dj', 'ј' => 'j', 'љ' => 'lj', 'њ' => 'nj', 'ћ' => 'c', 'џ' => 'dz', 'đ' => 'd',
|
||||
'Ђ' => 'Dj', 'Ј' => 'j', 'Љ' => 'Lj', 'Њ' => 'Nj', 'Ћ' => 'C', 'Џ' => 'Dz', 'Đ' => 'D'
|
||||
),
|
||||
'az' => array ( /* Azerbaijani */
|
||||
'ç' => 'c', 'ə' => 'e', 'ğ' => 'g', 'ı' => 'i', 'ö' => 'o', 'ş' => 's', 'ü' => 'u',
|
||||
'Ç' => 'C', 'Ə' => 'E', 'Ğ' => 'G', 'İ' => 'I', 'Ö' => 'O', 'Ş' => 'S', 'Ü' => 'U'
|
||||
),
|
||||
'slo' => array ( /* Slovakian */
|
||||
'DZ' => 'DZ', 'dz' => 'dz', 'DŽ' => 'DZ', 'dž' => 'dz', 'CH' => 'CH', 'Ĺ' => 'L', 'ĺ' => 'l', 'Ľ' => 'L',
|
||||
'ľ' => 'l', 'Ŕ' => 'R', 'ŕ' => 'r'
|
||||
),
|
||||
'cus' => array ( /* Custom */
|
||||
'Ĉ' => 'C', 'ĉ' => 'c', 'Ċ' => 'C', 'ċ' => 'c', 'Ď' => 'D', 'ď' => 'd', 'Ĕ' => 'E', 'ĕ' => 'e', 'Ĝ' => 'G', 'ĝ' => 'g',
|
||||
'Ġ' => 'G', 'ġ' => 'g', 'Ĥ' => 'H', 'ĥ' => 'h', 'Ħ' => 'H', 'ħ' => 'h', 'Ĭ' => 'I', 'ĭ' => 'i', 'IJ' => 'J', 'ij' => 'j',
|
||||
'Ĵ' => 'J', 'ĵ' => 'j', 'Ŀ' => 'L', 'ŀ' => 'l', 'ʼn' => 'n', 'Ō' => 'O', 'ō' => 'o', 'Ŏ' => 'O', 'ŏ' => 'o', 'Œ' => 'OE',
|
||||
'œ' => 'oe', 'Ŗ' => 'R', 'ŗ' => 'r', 'Ŝ' => 'S', 'ŝ' => 's', 'Ŧ' => 'T', 'ŧ' => 't', 'Ŭ' => 'U', 'ŭ' => 'u', 'Ŵ' => 'W',
|
||||
'ŵ' => 'w', 'Ŷ' => 'Y', 'ŷ' => 'y', 'Ÿ' => 'Y', 'ſ' => 'S', 'Ƒ' => 'F', 'ƒ' => 'f', 'Ǎ' => 'A', 'ǎ' => 'a', 'Ǐ' => 'I',
|
||||
'ǐ' => 'i', 'Ǒ' => 'O', 'ǒ' => 'o', 'Ǔ' => 'U', 'ǔ' => 'u', 'Ǖ' => 'U', 'ǖ' => 'u', 'Ǘ' => 'U', 'ǘ' => 'u', 'Ǚ' => 'U',
|
||||
'ǚ' => 'u', 'Ǜ' => 'U', 'ǜ' => 'u', 'Ǻ' => 'A', 'ǻ' => 'a', 'Ǽ' => 'AE', 'ǽ' => 'ae', 'Ǿ' => 'O', 'ǿ' => 'o'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* List of words to remove from URLs.
|
||||
*/
|
||||
public static $remove_list = array (
|
||||
'a', 'an', 'as', 'at', 'before', 'but', 'by', 'for', 'from',
|
||||
'is', 'in', 'into', 'like', 'of', 'off', 'on', 'onto', 'per',
|
||||
'since', 'than', 'the', 'this', 'that', 'to', 'up', 'via',
|
||||
'with'
|
||||
);
|
||||
|
||||
/**
|
||||
* The character map.
|
||||
*/
|
||||
private static $map = array ();
|
||||
|
||||
/**
|
||||
* The character list as a string.
|
||||
*/
|
||||
private static $chars = '';
|
||||
|
||||
/**
|
||||
* The character list as a regular expression.
|
||||
*/
|
||||
private static $regex = '';
|
||||
|
||||
/**
|
||||
* The current language
|
||||
*/
|
||||
private static $language = '';
|
||||
|
||||
/**
|
||||
* Initializes the character map.
|
||||
*/
|
||||
private static function init ($language = "") {
|
||||
if (count (self::$map) > 0 && (($language == "") || ($language == self::$language))) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Is a specific map associated with $language ? */
|
||||
if (isset(self::$maps[$language]) && is_array(self::$maps[$language])) {
|
||||
/* Move this map to end. This means it will have priority over others */
|
||||
$m = self::$maps[$language];
|
||||
unset(self::$maps[$language]);
|
||||
self::$maps[$language] = $m;
|
||||
}
|
||||
/* Reset static vars */
|
||||
self::$language = $language;
|
||||
self::$map = array();
|
||||
self::$chars = '';
|
||||
|
||||
foreach (self::$maps as $map) {
|
||||
foreach ($map as $orig => $conv) {
|
||||
self::$map[$orig] = $conv;
|
||||
self::$chars .= $orig;
|
||||
}
|
||||
}
|
||||
|
||||
self::$regex = '/[' . self::$chars . ']/u';
|
||||
}
|
||||
|
||||
/**
|
||||
* Add new characters to the list. `$map` should be a hash.
|
||||
*/
|
||||
public static function add_chars ($map) {
|
||||
if (! is_array ($map)) {
|
||||
throw new LogicException ('$map must be an associative array.');
|
||||
}
|
||||
self::$maps[] = $map;
|
||||
self::$map = array ();
|
||||
self::$chars = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Append words to the remove list. Accepts either single words
|
||||
* or an array of words.
|
||||
*/
|
||||
public static function remove_words ($words) {
|
||||
$words = is_array ($words) ? $words : array ($words);
|
||||
self::$remove_list = array_merge (self::$remove_list, $words);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transliterates characters to their ASCII equivalents.
|
||||
* $language specifies a priority for a specific language.
|
||||
* The latter is useful if languages have different rules for the same character.
|
||||
*/
|
||||
public static function downcode ($text, $language = "") {
|
||||
self::init ($language);
|
||||
|
||||
if (preg_match_all (self::$regex, $text, $matches)) {
|
||||
for ($i = 0; $i < count ($matches[0]); $i++) {
|
||||
$char = $matches[0][$i];
|
||||
if (isset (self::$map[$char])) {
|
||||
$text = str_replace ($char, self::$map[$char], $text);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters a string, e.g., "Petty theft" to "petty-theft"
|
||||
*/
|
||||
public static function filter ($text, $length = 60, $language = "", $file_name = false, $use_remove_list = true) {
|
||||
$text = self::downcode ($text,$language);
|
||||
|
||||
if ($use_remove_list) {
|
||||
// remove all these words from the string before urlifying
|
||||
$text = preg_replace ('/\b(' . join ('|', self::$remove_list) . ')\b/i', '', $text);
|
||||
}
|
||||
|
||||
// if downcode doesn't hit, the char will be stripped here
|
||||
$remove_pattern = ($file_name) ? '/[^_\-.\-a-zA-Z0-9\s]/u' : '/[^\s_\-a-zA-Z0-9]/u';
|
||||
$text = preg_replace ($remove_pattern, '', $text); // remove unneeded chars
|
||||
$text = str_replace ('_', ' ', $text); // treat underscores as spaces
|
||||
$text = preg_replace ('/^\s+|\s+$/u', '', $text); // trim leading/trailing spaces
|
||||
$text = preg_replace ('/[-\s]+/u', '-', $text); // convert spaces to hyphens
|
||||
$text = strtolower ($text); // convert to lowercase
|
||||
return trim (substr ($text, 0, $length), '-'); // trim to first $length chars
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias of `URLify::downcode()`.
|
||||
*/
|
||||
public static function transliterate ($text) {
|
||||
return self::downcode ($text);
|
||||
}
|
||||
}
|
||||
2
system/vendor/autoload.php
vendored
2
system/vendor/autoload.php
vendored
|
|
@ -4,4 +4,4 @@
|
|||
|
||||
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit202d771b98d07410d9e52c5a90cbc9e1::getLoader();
|
||||
return ComposerAutoloaderInitd88c6c25320034df85dd42f1462fbda7::getLoader();
|
||||
|
|
|
|||
8
system/vendor/composer/ClassLoader.php
vendored
8
system/vendor/composer/ClassLoader.php
vendored
|
|
@ -13,9 +13,7 @@
|
|||
namespace Composer\Autoload;
|
||||
|
||||
/**
|
||||
* ClassLoader implements a PSR-0 class loader
|
||||
*
|
||||
* See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
|
||||
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
||||
*
|
||||
* $loader = new \Composer\Autoload\ClassLoader();
|
||||
*
|
||||
|
|
@ -39,6 +37,8 @@ namespace Composer\Autoload;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @see http://www.php-fig.org/psr/psr-0/
|
||||
* @see http://www.php-fig.org/psr/psr-4/
|
||||
*/
|
||||
class ClassLoader
|
||||
{
|
||||
|
|
@ -147,7 +147,7 @@ class ClassLoader
|
|||
* appending or prepending to the ones previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param array|string $paths The PSR-0 base directories
|
||||
* @param array|string $paths The PSR-4 base directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
|
|
|
|||
2
system/vendor/composer/LICENSE
vendored
2
system/vendor/composer/LICENSE
vendored
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
Copyright (c) 2015 Nils Adermann, Jordi Boggiano
|
||||
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
2
system/vendor/composer/autoload_classmap.php
vendored
2
system/vendor/composer/autoload_classmap.php
vendored
|
|
@ -19,4 +19,6 @@ return array(
|
|||
'Suin\\RSSWriter\\Item' => $vendorDir . '/suin/php-rss-writer/src/Suin/RSSWriter/Item.php',
|
||||
'Suin\\RSSWriter\\ItemInterface' => $vendorDir . '/suin/php-rss-writer/src/Suin/RSSWriter/ItemInterface.php',
|
||||
'Suin\\RSSWriter\\SimpleXMLElement' => $vendorDir . '/suin/php-rss-writer/src/Suin/RSSWriter/SimpleXMLElement.php',
|
||||
'URLify' => $vendorDir . '/jbroadway/urlify/URLify.php',
|
||||
'URLifyTest' => $vendorDir . '/jbroadway/urlify/tests/URLifyTest.php',
|
||||
);
|
||||
|
|
|
|||
13
system/vendor/composer/autoload_files.php
vendored
13
system/vendor/composer/autoload_files.php
vendored
|
|
@ -6,11 +6,10 @@ $vendorDir = dirname(dirname(__FILE__));
|
|||
$baseDir = dirname(dirname($vendorDir));
|
||||
|
||||
return array(
|
||||
'05669301f06448944ce5eb260126f84e' => $vendorDir . '/ircmaxell/password-compat/lib/password.php',
|
||||
'd662bbf785a887e687f7fa6bdd9aa881' => $baseDir . '/system/includes/dispatch.php',
|
||||
'fb0ea7d90f78e44562b8d920c0121d2e' => $baseDir . '/system/includes/functions.php',
|
||||
'e007dd6c75e8015538ebb6eebefb736e' => $baseDir . '/system/admin/admin.php',
|
||||
'372406877c969643fd5d4bdc28f7a64a' => $baseDir . '/system/includes/session.php',
|
||||
'46286444bb46675598ca39831bb66c52' => $baseDir . '/system/includes/opml.php',
|
||||
'7487caa065ba62094dc29560a54a535d' => $baseDir . '/system/plugins/urlify/URLify.php',
|
||||
'e40631d46120a9c38ea139981f8dab26' => $vendorDir . '/ircmaxell/password-compat/lib/password.php',
|
||||
'3abd73be56f01e9aafc62d31c7e15d91' => $baseDir . '/system/includes/dispatch.php',
|
||||
'f770a6f41af7b4285303bdcc4ff87ba7' => $baseDir . '/system/includes/functions.php',
|
||||
'8432047aca7938f88a2098a2f7770228' => $baseDir . '/system/admin/admin.php',
|
||||
'1b9bf2d9d029f1364c3d7262b5375c41' => $baseDir . '/system/includes/session.php',
|
||||
'62f038defb1b29aab3998eb437e01df9' => $baseDir . '/system/includes/opml.php',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ $vendorDir = dirname(dirname(__FILE__));
|
|||
$baseDir = dirname(dirname($vendorDir));
|
||||
|
||||
return array(
|
||||
'URLify' => array($vendorDir . '/jbroadway/urlify'),
|
||||
'Suin\\RSSWriter' => array($vendorDir . '/suin/php-rss-writer/src'),
|
||||
'Michelf' => array($vendorDir . '/michelf/php-markdown'),
|
||||
);
|
||||
|
|
|
|||
21
system/vendor/composer/autoload_real.php
vendored
21
system/vendor/composer/autoload_real.php
vendored
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit202d771b98d07410d9e52c5a90cbc9e1
|
||||
class ComposerAutoloaderInitd88c6c25320034df85dd42f1462fbda7
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
|
@ -19,10 +19,16 @@ class ComposerAutoloaderInit202d771b98d07410d9e52c5a90cbc9e1
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit202d771b98d07410d9e52c5a90cbc9e1', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitd88c6c25320034df85dd42f1462fbda7', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit202d771b98d07410d9e52c5a90cbc9e1', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitd88c6c25320034df85dd42f1462fbda7', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
|
||||
if ($useStaticLoader) {
|
||||
require_once __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitd88c6c25320034df85dd42f1462fbda7::getInitializer($loader));
|
||||
} else {
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->set($namespace, $path);
|
||||
|
|
@ -37,19 +43,24 @@ class ComposerAutoloaderInit202d771b98d07410d9e52c5a90cbc9e1
|
|||
if ($classMap) {
|
||||
$loader->addClassMap($classMap);
|
||||
}
|
||||
}
|
||||
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitd88c6c25320034df85dd42f1462fbda7::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire202d771b98d07410d9e52c5a90cbc9e1($fileIdentifier, $file);
|
||||
composerRequired88c6c25320034df85dd42f1462fbda7($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequire202d771b98d07410d9e52c5a90cbc9e1($fileIdentifier, $file)
|
||||
function composerRequired88c6c25320034df85dd42f1462fbda7($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
|
|
|||
84
system/vendor/composer/autoload_static.php
vendored
Normal file
84
system/vendor/composer/autoload_static.php
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
|
||||
// autoload_static.php @generated by Composer
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitd88c6c25320034df85dd42f1462fbda7
|
||||
{
|
||||
public static $files = array (
|
||||
'e40631d46120a9c38ea139981f8dab26' => __DIR__ . '/..' . '/ircmaxell/password-compat/lib/password.php',
|
||||
'3abd73be56f01e9aafc62d31c7e15d91' => __DIR__ . '/../../..' . '/system/includes/dispatch.php',
|
||||
'f770a6f41af7b4285303bdcc4ff87ba7' => __DIR__ . '/../../..' . '/system/includes/functions.php',
|
||||
'8432047aca7938f88a2098a2f7770228' => __DIR__ . '/../../..' . '/system/admin/admin.php',
|
||||
'1b9bf2d9d029f1364c3d7262b5375c41' => __DIR__ . '/../../..' . '/system/includes/session.php',
|
||||
'62f038defb1b29aab3998eb437e01df9' => __DIR__ . '/../../..' . '/system/includes/opml.php',
|
||||
);
|
||||
|
||||
public static $prefixLengthsPsr4 = array (
|
||||
'K' =>
|
||||
array (
|
||||
'Kanti\\' => 6,
|
||||
),
|
||||
);
|
||||
|
||||
public static $prefixDirsPsr4 = array (
|
||||
'Kanti\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/kanti/hub-updater/src',
|
||||
),
|
||||
);
|
||||
|
||||
public static $prefixesPsr0 = array (
|
||||
'U' =>
|
||||
array (
|
||||
'URLify' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/jbroadway/urlify',
|
||||
),
|
||||
),
|
||||
'S' =>
|
||||
array (
|
||||
'Suin\\RSSWriter' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/suin/php-rss-writer/src',
|
||||
),
|
||||
),
|
||||
'M' =>
|
||||
array (
|
||||
'Michelf' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/michelf/php-markdown',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
public static $classMap = array (
|
||||
'Kanti\\CacheOneFile' => __DIR__ . '/..' . '/kanti/hub-updater/src/CacheOneFile.php',
|
||||
'Kanti\\HelperClass' => __DIR__ . '/..' . '/kanti/hub-updater/src/HelperClass.php',
|
||||
'Kanti\\HubUpdater' => __DIR__ . '/..' . '/kanti/hub-updater/src/HubUpdater.php',
|
||||
'Michelf\\Markdown' => __DIR__ . '/..' . '/michelf/php-markdown/Michelf/Markdown.php',
|
||||
'Michelf\\MarkdownExtra' => __DIR__ . '/..' . '/michelf/php-markdown/Michelf/MarkdownExtra.php',
|
||||
'Michelf\\MarkdownInterface' => __DIR__ . '/..' . '/michelf/php-markdown/Michelf/MarkdownInterface.php',
|
||||
'Suin\\RSSWriter\\Channel' => __DIR__ . '/..' . '/suin/php-rss-writer/src/Suin/RSSWriter/Channel.php',
|
||||
'Suin\\RSSWriter\\ChannelInterface' => __DIR__ . '/..' . '/suin/php-rss-writer/src/Suin/RSSWriter/ChannelInterface.php',
|
||||
'Suin\\RSSWriter\\Feed' => __DIR__ . '/..' . '/suin/php-rss-writer/src/Suin/RSSWriter/Feed.php',
|
||||
'Suin\\RSSWriter\\FeedInterface' => __DIR__ . '/..' . '/suin/php-rss-writer/src/Suin/RSSWriter/FeedInterface.php',
|
||||
'Suin\\RSSWriter\\Item' => __DIR__ . '/..' . '/suin/php-rss-writer/src/Suin/RSSWriter/Item.php',
|
||||
'Suin\\RSSWriter\\ItemInterface' => __DIR__ . '/..' . '/suin/php-rss-writer/src/Suin/RSSWriter/ItemInterface.php',
|
||||
'Suin\\RSSWriter\\SimpleXMLElement' => __DIR__ . '/..' . '/suin/php-rss-writer/src/Suin/RSSWriter/SimpleXMLElement.php',
|
||||
'URLify' => __DIR__ . '/..' . '/jbroadway/urlify/URLify.php',
|
||||
'URLifyTest' => __DIR__ . '/..' . '/jbroadway/urlify/tests/URLifyTest.php',
|
||||
);
|
||||
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitd88c6c25320034df85dd42f1462fbda7::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitd88c6c25320034df85dd42f1462fbda7::$prefixDirsPsr4;
|
||||
$loader->prefixesPsr0 = ComposerStaticInitd88c6c25320034df85dd42f1462fbda7::$prefixesPsr0;
|
||||
$loader->classMap = ComposerStaticInitd88c6c25320034df85dd42f1462fbda7::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
}
|
||||
148
system/vendor/composer/installed.json
vendored
148
system/vendor/composer/installed.json
vendored
|
|
@ -43,52 +43,6 @@
|
|||
"password"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "suin/php-rss-writer",
|
||||
"version": "1.3.1",
|
||||
"version_normalized": "1.3.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/suin/php-rss-writer.git",
|
||||
"reference": "96ff59575442dbe23e15fe7ff56d0bf27486cff9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/suin/php-rss-writer/zipball/96ff59575442dbe23e15fe7ff56d0bf27486cff9",
|
||||
"reference": "96ff59575442dbe23e15fe7ff56d0bf27486cff9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"time": "2015-08-21 06:24:39",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Suin\\RSSWriter": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hidehito Nozawa aka Suin",
|
||||
"email": "suinyeze@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Yet another simple RSS writer library for PHP 5.3 or later.",
|
||||
"homepage": "https://github.com/suin/php-rss-writer",
|
||||
"keywords": [
|
||||
"feed",
|
||||
"generator",
|
||||
"php",
|
||||
"rss",
|
||||
"writer"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "michelf/php-markdown",
|
||||
"version": "1.6.0",
|
||||
|
|
@ -187,5 +141,107 @@
|
|||
}
|
||||
],
|
||||
"description": "Simple Github Updater for Web Projects"
|
||||
},
|
||||
{
|
||||
"name": "suin/php-rss-writer",
|
||||
"version": "1.3.2",
|
||||
"version_normalized": "1.3.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/suin/php-rss-writer.git",
|
||||
"reference": "51840d2fad4087a4bdd93fb6937aa4b324b5c94f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/suin/php-rss-writer/zipball/51840d2fad4087a4bdd93fb6937aa4b324b5c94f",
|
||||
"reference": "51840d2fad4087a4bdd93fb6937aa4b324b5c94f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"time": "2016-03-01 12:09:17",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Suin\\RSSWriter": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hidehito Nozawa aka Suin",
|
||||
"email": "suinyeze@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Yet another simple RSS writer library for PHP 5.3 or later.",
|
||||
"homepage": "https://github.com/suin/php-rss-writer",
|
||||
"keywords": [
|
||||
"feed",
|
||||
"generator",
|
||||
"php",
|
||||
"rss",
|
||||
"writer"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "jbroadway/urlify",
|
||||
"version": "1.0.8-stable",
|
||||
"version_normalized": "1.0.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jbroadway/urlify.git",
|
||||
"reference": "984c991881501098eafdc41053b243237191cff8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jbroadway/urlify/zipball/984c991881501098eafdc41053b243237191cff8",
|
||||
"reference": "984c991881501098eafdc41053b243237191cff8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"time": "2016-07-27 15:26:43",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"URLify": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Johnny Broadway",
|
||||
"email": "johnny@johnnybroadway.com",
|
||||
"homepage": "http://www.johnnybroadway.com/"
|
||||
}
|
||||
],
|
||||
"description": "PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.",
|
||||
"homepage": "https://github.com/jbroadway/urlify",
|
||||
"keywords": [
|
||||
"encode",
|
||||
"iconv",
|
||||
"link",
|
||||
"slug",
|
||||
"translit",
|
||||
"transliterate",
|
||||
"transliteration",
|
||||
"url",
|
||||
"urlify"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
273
system/vendor/jbroadway/urlify/URLify.php
vendored
Normal file
273
system/vendor/jbroadway/urlify/URLify.php
vendored
Normal file
|
|
@ -0,0 +1,273 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* A PHP port of URLify.js from the Django project
|
||||
* (https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/urlify.js).
|
||||
* Handles symbols from Latin languages, Greek, Turkish, Bulgarian, Russian,
|
||||
* Ukrainian, Czech, Polish, Romanian, Latvian, Lithuanian, Vietnamese, Arabic,
|
||||
* Serbian, and Azerbaijani. Symbols it cannot transliterate
|
||||
* it will simply omit.
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* echo URLify::filter (' J\'étudie le français ');
|
||||
* // "jetudie-le-francais"
|
||||
*
|
||||
* echo URLify::filter ('Lo siento, no hablo español.');
|
||||
* // "lo-siento-no-hablo-espanol"
|
||||
*/
|
||||
class URLify {
|
||||
public static $maps = array (
|
||||
'de' => array ( /* German */
|
||||
'Ä' => 'Ae', 'Ö' => 'Oe', 'Ü' => 'Ue', 'ä' => 'ae', 'ö' => 'oe', 'ü' => 'ue', 'ß' => 'ss',
|
||||
'ẞ' => 'SS'
|
||||
),
|
||||
'latin' => array (
|
||||
'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A','Ă' => 'A', 'Æ' => 'AE', 'Ç' =>
|
||||
'C', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I',
|
||||
'Ï' => 'I', 'Ð' => 'D', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' =>
|
||||
'O', 'Ő' => 'O', 'Ø' => 'O', 'Œ' => 'OE' ,'Ș' => 'S','Ț' => 'T', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ű' => 'U',
|
||||
'Ý' => 'Y', 'Þ' => 'TH', 'ß' => 'ss', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' =>
|
||||
'a', 'å' => 'a', 'ă' => 'a', 'æ' => 'ae', 'ç' => 'c', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e',
|
||||
'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', 'ð' => 'd', 'ñ' => 'n', 'ò' => 'o', 'ó' =>
|
||||
'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'o', 'ő' => 'o', 'ø' => 'o', 'œ' => 'oe', 'ș' => 's', 'ț' => 't', 'ù' => 'u', 'ú' => 'u',
|
||||
'û' => 'u', 'ü' => 'u', 'ű' => 'u', 'ý' => 'y', 'þ' => 'th', 'ÿ' => 'y'
|
||||
),
|
||||
'latin_symbols' => array (
|
||||
'©' => '(c)'
|
||||
),
|
||||
'el' => array ( /* Greek */
|
||||
'α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', 'ζ' => 'z', 'η' => 'h', 'θ' => '8',
|
||||
'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => '3', 'ο' => 'o', 'π' => 'p',
|
||||
'ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'y', 'φ' => 'f', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'w',
|
||||
'ά' => 'a', 'έ' => 'e', 'ί' => 'i', 'ό' => 'o', 'ύ' => 'y', 'ή' => 'h', 'ώ' => 'w', 'ς' => 's',
|
||||
'ϊ' => 'i', 'ΰ' => 'y', 'ϋ' => 'y', 'ΐ' => 'i',
|
||||
'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'H', 'Θ' => '8',
|
||||
'Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => '3', 'Ο' => 'O', 'Π' => 'P',
|
||||
'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'F', 'Χ' => 'X', 'Ψ' => 'PS', 'Ω' => 'W',
|
||||
'Ά' => 'A', 'Έ' => 'E', 'Ί' => 'I', 'Ό' => 'O', 'Ύ' => 'Y', 'Ή' => 'H', 'Ώ' => 'W', 'Ϊ' => 'I',
|
||||
'Ϋ' => 'Y'
|
||||
),
|
||||
'tr' => array ( /* Turkish */
|
||||
'ş' => 's', 'Ş' => 'S', 'ı' => 'i', 'İ' => 'I', 'ç' => 'c', 'Ç' => 'C', 'ü' => 'u', 'Ü' => 'U',
|
||||
'ö' => 'o', 'Ö' => 'O', 'ğ' => 'g', 'Ğ' => 'G'
|
||||
),
|
||||
'bg' => array( /* Bulgarian */
|
||||
"Щ" => 'Sht', "Ш" => 'Sh', "Ч" => 'Ch', "Ц" => 'C', "Ю" => 'Yu', "Я" => 'Ya',
|
||||
"Ж" => 'J', "А" => 'A', "Б" => 'B', "В" => 'V', "Г" => 'G', "Д" => 'D',
|
||||
"Е" => 'E', "З" => 'Z', "И" => 'I', "Й" => 'Y', "К" => 'K', "Л" => 'L',
|
||||
"М" => 'M', "Н" => 'N', "О" => 'O', "П" => 'P', "Р" => 'R', "С" => 'S',
|
||||
"Т" => 'T', "У" => 'U', "Ф" => 'F', "Х" => 'H', "Ь" => '', "Ъ" => 'A',
|
||||
"щ" => 'sht', "ш" => 'sh', "ч" => 'ch', "ц" => 'c', "ю" => 'yu', "я" => 'ya',
|
||||
"ж" => 'j', "а" => 'a', "б" => 'b', "в" => 'v', "г" => 'g', "д" => 'd',
|
||||
"е" => 'e', "з" => 'z', "и" => 'i', "й" => 'y', "к" => 'k', "л" => 'l',
|
||||
"м" => 'm', "н" => 'n', "о" => 'o', "п" => 'p', "р" => 'r', "с" => 's',
|
||||
"т" => 't', "у" => 'u', "ф" => 'f', "х" => 'h', "ь" => '', "ъ" => 'a'
|
||||
),
|
||||
'ru' => array ( /* Russian */
|
||||
'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'е' => 'e', 'ё' => 'yo', 'ж' => 'zh',
|
||||
'з' => 'z', 'и' => 'i', 'й' => 'j', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o',
|
||||
'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c',
|
||||
'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sh', 'ъ' => '', 'ы' => 'y', 'ь' => '', 'э' => 'e', 'ю' => 'yu',
|
||||
'я' => 'ya',
|
||||
'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'Yo', 'Ж' => 'Zh',
|
||||
'З' => 'Z', 'И' => 'I', 'Й' => 'J', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O',
|
||||
'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C',
|
||||
'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sh', 'Ъ' => '', 'Ы' => 'Y', 'Ь' => '', 'Э' => 'E', 'Ю' => 'Yu',
|
||||
'Я' => 'Ya',
|
||||
'№' => ''
|
||||
),
|
||||
'uk' => array ( /* Ukrainian */
|
||||
'Є' => 'Ye', 'І' => 'I', 'Ї' => 'Yi', 'Ґ' => 'G', 'є' => 'ye', 'і' => 'i', 'ї' => 'yi', 'ґ' => 'g'
|
||||
),
|
||||
'cs' => array ( /* Czech */
|
||||
'č' => 'c', 'ď' => 'd', 'ě' => 'e', 'ň' => 'n', 'ř' => 'r', 'š' => 's', 'ť' => 't', 'ů' => 'u',
|
||||
'ž' => 'z', 'Č' => 'C', 'Ď' => 'D', 'Ě' => 'E', 'Ň' => 'N', 'Ř' => 'R', 'Š' => 'S', 'Ť' => 'T',
|
||||
'Ů' => 'U', 'Ž' => 'Z'
|
||||
),
|
||||
'pl' => array ( /* Polish */
|
||||
'ą' => 'a', 'ć' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n', 'ó' => 'o', 'ś' => 's', 'ź' => 'z',
|
||||
'ż' => 'z', 'Ą' => 'A', 'Ć' => 'C', 'Ę' => 'e', 'Ł' => 'L', 'Ń' => 'N', 'Ó' => 'O', 'Ś' => 'S',
|
||||
'Ź' => 'Z', 'Ż' => 'Z'
|
||||
),
|
||||
'ro' => array ( /* Romanian */
|
||||
'ă' => 'a', 'â' => 'a', 'î' => 'i', 'ș' => 's', 'ț' => 't', 'Ţ' => 'T', 'ţ' => 't'
|
||||
),
|
||||
'lv' => array ( /* Latvian */
|
||||
'ā' => 'a', 'č' => 'c', 'ē' => 'e', 'ģ' => 'g', 'ī' => 'i', 'ķ' => 'k', 'ļ' => 'l', 'ņ' => 'n',
|
||||
'š' => 's', 'ū' => 'u', 'ž' => 'z', 'Ā' => 'A', 'Č' => 'C', 'Ē' => 'E', 'Ģ' => 'G', 'Ī' => 'i',
|
||||
'Ķ' => 'k', 'Ļ' => 'L', 'Ņ' => 'N', 'Š' => 'S', 'Ū' => 'u', 'Ž' => 'Z'
|
||||
),
|
||||
'lt' => array ( /* Lithuanian */
|
||||
'ą' => 'a', 'č' => 'c', 'ę' => 'e', 'ė' => 'e', 'į' => 'i', 'š' => 's', 'ų' => 'u', 'ū' => 'u', 'ž' => 'z',
|
||||
'Ą' => 'A', 'Č' => 'C', 'Ę' => 'E', 'Ė' => 'E', 'Į' => 'I', 'Š' => 'S', 'Ų' => 'U', 'Ū' => 'U', 'Ž' => 'Z'
|
||||
),
|
||||
'vn' => array ( /* Vietnamese */
|
||||
'Á' => 'A', 'À' => 'A', 'Ả' => 'A', 'Ã' => 'A', 'Ạ' => 'A', 'Ă' => 'A', 'Ắ' => 'A', 'Ằ' => 'A', 'Ẳ' => 'A', 'Ẵ' => 'A', 'Ặ' => 'A', 'Â' => 'A', 'Ấ' => 'A', 'Ầ' => 'A', 'Ẩ' => 'A', 'Ẫ' => 'A', 'Ậ' => 'A',
|
||||
'á' => 'a', 'à' => 'a', 'ả' => 'a', 'ã' => 'a', 'ạ' => 'a', 'ă' => 'a', 'ắ' => 'a', 'ằ' => 'a', 'ẳ' => 'a', 'ẵ' => 'a', 'ặ' => 'a', 'â' => 'a', 'ấ' => 'a', 'ầ' => 'a', 'ẩ' => 'a', 'ẫ' => 'a', 'ậ' => 'a',
|
||||
'É' => 'E', 'È' => 'E', 'Ẻ' => 'E', 'Ẽ' => 'E', 'Ẹ' => 'E', 'Ê' => 'E', 'Ế' => 'E', 'Ề' => 'E', 'Ể' => 'E', 'Ễ' => 'E', 'Ệ' => 'E',
|
||||
'é' => 'e', 'è' => 'e', 'ẻ' => 'e', 'ẽ' => 'e', 'ẹ' => 'e', 'ê' => 'e', 'ế' => 'e', 'ề' => 'e', 'ể' => 'e', 'ễ' => 'e', 'ệ' => 'e',
|
||||
'Í' => 'I', 'Ì' => 'I', 'Ỉ' => 'I', 'Ĩ' => 'I', 'Ị' => 'I', 'í' => 'i', 'ì' => 'i', 'ỉ' => 'i', 'ĩ' => 'i', 'ị' => 'i',
|
||||
'Ó' => 'O', 'Ò' => 'O', 'Ỏ' => 'O', 'Õ' => 'O', 'Ọ' => 'O', 'Ô' => 'O', 'Ố' => 'O', 'Ồ' => 'O', 'Ổ' => 'O', 'Ỗ' => 'O', 'Ộ' => 'O', 'Ơ' => 'O', 'Ớ' => 'O', 'Ờ' => 'O', 'Ở' => 'O', 'Ỡ' => 'O', 'Ợ' => 'O',
|
||||
'ó' => 'o', 'ò' => 'o', 'ỏ' => 'o', 'õ' => 'o', 'ọ' => 'o', 'ô' => 'o', 'ố' => 'o', 'ồ' => 'o', 'ổ' => 'o', 'ỗ' => 'o', 'ộ' => 'o', 'ơ' => 'o', 'ớ' => 'o', 'ờ' => 'o', 'ở' => 'o', 'ỡ' => 'o', 'ợ' => 'o',
|
||||
'Ú' => 'U', 'Ù' => 'U', 'Ủ' => 'U', 'Ũ' => 'U', 'Ụ' => 'U', 'Ư' => 'U', 'Ứ' => 'U', 'Ừ' => 'U', 'Ử' => 'U', 'Ữ' => 'U', 'Ự' => 'U',
|
||||
'ú' => 'u', 'ù' => 'u', 'ủ' => 'u', 'ũ' => 'u', 'ụ' => 'u', 'ư' => 'u', 'ứ' => 'u', 'ừ' => 'u', 'ử' => 'u', 'ữ' => 'u', 'ự' => 'u',
|
||||
'Ý' => 'Y', 'Ỳ' => 'Y', 'Ỷ' => 'Y', 'Ỹ' => 'Y', 'Ỵ' => 'Y', 'ý' => 'y', 'ỳ' => 'y', 'ỷ' => 'y', 'ỹ' => 'y', 'ỵ' => 'y',
|
||||
'Đ' => 'D', 'đ' => 'd'
|
||||
),
|
||||
'ar' => array ( /* Arabic */
|
||||
'أ' => 'a', 'ب' => 'b', 'ت' => 't', 'ث' => 'th', 'ج' => 'g', 'ح' => 'h', 'خ' => 'kh', 'د' => 'd',
|
||||
'ذ' => 'th', 'ر' => 'r', 'ز' => 'z', 'س' => 's', 'ش' => 'sh', 'ص' => 's', 'ض' => 'd', 'ط' => 't',
|
||||
'ظ' => 'th', 'ع' => 'aa', 'غ' => 'gh', 'ف' => 'f', 'ق' => 'k', 'ك' => 'k', 'ل' => 'l', 'م' => 'm',
|
||||
'ن' => 'n', 'ه' => 'h', 'و' => 'o', 'ي' => 'y'
|
||||
),
|
||||
'sr' => array ( /* Serbian */
|
||||
'ђ' => 'dj', 'ј' => 'j', 'љ' => 'lj', 'њ' => 'nj', 'ћ' => 'c', 'џ' => 'dz', 'đ' => 'dj',
|
||||
'Ђ' => 'Dj', 'Ј' => 'j', 'Љ' => 'Lj', 'Њ' => 'Nj', 'Ћ' => 'C', 'Џ' => 'Dz', 'Đ' => 'Dj'
|
||||
),
|
||||
'az' => array ( /* Azerbaijani */
|
||||
'ç' => 'c', 'ə' => 'e', 'ğ' => 'g', 'ı' => 'i', 'ö' => 'o', 'ş' => 's', 'ü' => 'u',
|
||||
'Ç' => 'C', 'Ə' => 'E', 'Ğ' => 'G', 'İ' => 'I', 'Ö' => 'O', 'Ş' => 'S', 'Ü' => 'U'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* List of words to remove from URLs.
|
||||
*/
|
||||
public static $remove_list = array (
|
||||
'a', 'an', 'as', 'at', 'before', 'but', 'by', 'for', 'from',
|
||||
'is', 'in', 'into', 'like', 'of', 'off', 'on', 'onto', 'per',
|
||||
'since', 'than', 'the', 'this', 'that', 'to', 'up', 'via',
|
||||
'with'
|
||||
);
|
||||
|
||||
/**
|
||||
* The character map.
|
||||
*/
|
||||
private static $map = array ();
|
||||
|
||||
/**
|
||||
* The character list as a string.
|
||||
*/
|
||||
private static $chars = '';
|
||||
|
||||
/**
|
||||
* The character list as a regular expression.
|
||||
*/
|
||||
private static $regex = '';
|
||||
|
||||
/**
|
||||
* The current language
|
||||
*/
|
||||
private static $language = '';
|
||||
|
||||
/**
|
||||
* Initializes the character map.
|
||||
*/
|
||||
private static function init ($language = "") {
|
||||
if (count (self::$map) > 0 && (($language == "") || ($language == self::$language))) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Is a specific map associated with $language ? */
|
||||
if (isset(self::$maps[$language]) && is_array(self::$maps[$language])) {
|
||||
/* Move this map to end. This means it will have priority over others */
|
||||
$m = self::$maps[$language];
|
||||
unset(self::$maps[$language]);
|
||||
self::$maps[$language] = $m;
|
||||
}
|
||||
/* Reset static vars */
|
||||
self::$language = $language;
|
||||
self::$map = array();
|
||||
self::$chars = '';
|
||||
|
||||
foreach (self::$maps as $map) {
|
||||
foreach ($map as $orig => $conv) {
|
||||
self::$map[$orig] = $conv;
|
||||
self::$chars .= $orig;
|
||||
}
|
||||
}
|
||||
|
||||
self::$regex = '/[' . self::$chars . ']/u';
|
||||
}
|
||||
|
||||
/**
|
||||
* Add new characters to the list. `$map` should be a hash.
|
||||
*/
|
||||
public static function add_chars ($map) {
|
||||
if (! is_array ($map)) {
|
||||
throw new LogicException ('$map must be an associative array.');
|
||||
}
|
||||
self::$maps[] = $map;
|
||||
self::$map = array ();
|
||||
self::$chars = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Append words to the remove list. Accepts either single words
|
||||
* or an array of words.
|
||||
*/
|
||||
public static function remove_words ($words) {
|
||||
$words = is_array ($words) ? $words : array ($words);
|
||||
self::$remove_list = array_merge (self::$remove_list, $words);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transliterates characters to their ASCII equivalents.
|
||||
* $language specifies a priority for a specific language.
|
||||
* The latter is useful if languages have different rules for the same character.
|
||||
*/
|
||||
public static function downcode ($text, $language = "") {
|
||||
self::init ($language);
|
||||
|
||||
if (preg_match_all (self::$regex, $text, $matches)) {
|
||||
for ($i = 0; $i < count ($matches[0]); $i++) {
|
||||
$char = $matches[0][$i];
|
||||
if (isset (self::$map[$char])) {
|
||||
$text = str_replace ($char, self::$map[$char], $text);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters a string, e.g., "Petty theft" to "petty-theft"
|
||||
* @param string $text The text to return filtered
|
||||
* @param int $length The length (after filtering) of the string to be returned
|
||||
* @param string $language The transliteration language, passed down to downcode()
|
||||
* @param bool $file_name Whether there should be and additional filter considering this is a filename
|
||||
* @param bool $use_remove_list Whether you want to remove specific elements previously set in self::$remove_list
|
||||
* @param bool $lower_case Whether you want the filter to maintain casing or lowercase everything (default)
|
||||
* @param bool $treat_underscore_as_space Treat underscore as space, so it will replaced with "-"
|
||||
*/
|
||||
public static function filter ($text, $length = 60, $language = "", $file_name = false, $use_remove_list = true, $lower_case = true, $treat_underscore_as_space = true) {
|
||||
$text = self::downcode ($text,$language);
|
||||
|
||||
if ($use_remove_list) {
|
||||
// remove all these words from the string before urlifying
|
||||
$text = preg_replace ('/\b(' . join ('|', self::$remove_list) . ')\b/i', '', $text);
|
||||
}
|
||||
|
||||
// if downcode doesn't hit, the char will be stripped here
|
||||
$remove_pattern = ($file_name) ? '/[^_\-.\-a-zA-Z0-9\s]/u' : '/[^\s_\-a-zA-Z0-9]/u';
|
||||
$text = preg_replace ($remove_pattern, '', $text); // remove unneeded chars
|
||||
if ($treat_underscore_as_space) {
|
||||
$text = str_replace ('_', ' ', $text); // treat underscores as spaces
|
||||
}
|
||||
$text = preg_replace ('/^\s+|\s+$/u', '', $text); // trim leading/trailing spaces
|
||||
$text = preg_replace ('/[-\s]+/u', '-', $text); // convert spaces to hyphens
|
||||
if ($lower_case) {
|
||||
$text = strtolower ($text); // convert to lowercase
|
||||
}
|
||||
|
||||
return trim (substr ($text, 0, $length), '-'); // trim to first $length chars
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias of `URLify::downcode()`.
|
||||
*/
|
||||
public static function transliterate ($text) {
|
||||
return self::downcode ($text);
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,8 @@ class URLifyTest extends PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals ('bobby-mcferrin-dont-worry-be-happy', URLify::filter ("Bobby McFerrin — Don't worry be happy",600,"en"));
|
||||
// test stripping and conversion of UTF-8 spaces
|
||||
$this->assertEquals ('test-mahito-mukai', URLify::filter('向井 真人test (Mahito Mukai)'));
|
||||
// Treat underscore as space
|
||||
$this->assertEquals ('text_with_underscore', URLify::filter('text_with_underscore', 60, "en", true, true, true, false));
|
||||
}
|
||||
|
||||
function test_add_chars () {
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
.gitattributes export-ignore
|
||||
.gitignore export-ignore
|
||||
example.php export-ignore
|
||||
example2.php export-ignore
|
||||
.updateignore export-ignore
|
||||
README.md export-ignore
|
||||
tests export-ignore
|
||||
|
|
@ -1 +0,0 @@
|
|||
README.md
|
||||
39
system/vendor/kanti/hub-updater/CacheOneFile.php
vendored
39
system/vendor/kanti/hub-updater/CacheOneFile.php
vendored
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Kanti;
|
||||
|
||||
class CacheOneFile
|
||||
{
|
||||
protected $fileName = "";
|
||||
protected $holdTime = 43200; //12h
|
||||
|
||||
public function __construct($fileName, $holdTime = 43200)
|
||||
{
|
||||
$this->fileName = $fileName;
|
||||
$this->holdTime = $holdTime;
|
||||
}
|
||||
|
||||
public function is()
|
||||
{
|
||||
if (! HelperClass::fileExists($this->fileName)) {
|
||||
return false;
|
||||
}
|
||||
if (filemtime($this->fileName) < ( time() - $this->holdTime )) {
|
||||
unlink($this->fileName);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function get()
|
||||
{
|
||||
return file_get_contents($this->fileName);
|
||||
}
|
||||
|
||||
public function set($content)
|
||||
{
|
||||
file_put_contents($this->fileName, $content);
|
||||
}
|
||||
}
|
||||
12
system/vendor/kanti/hub-updater/HelperClass.php
vendored
12
system/vendor/kanti/hub-updater/HelperClass.php
vendored
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Kanti;
|
||||
|
||||
class HelperClass{
|
||||
static public function fileExists($file){
|
||||
return file_exists(dirname($_SERVER["SCRIPT_FILENAME"]) . "/" . $file);
|
||||
}
|
||||
static public function isInPhar() {
|
||||
return substr(__FILE__,0,7) === "phar://";
|
||||
}
|
||||
}
|
||||
293
system/vendor/kanti/hub-updater/HubUpdater.php
vendored
293
system/vendor/kanti/hub-updater/HubUpdater.php
vendored
|
|
@ -1,293 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Kanti;
|
||||
|
||||
class HubUpdater
|
||||
{
|
||||
protected $options = array(
|
||||
"cacheFile" => "downloadInfo.json",
|
||||
"holdTime" => 43200,
|
||||
|
||||
"versionFile" => "installedVersion.json",
|
||||
"zipFile" => "tmpZipFile.zip",
|
||||
"updateignore" => ".updateignore",
|
||||
|
||||
"name" => "",
|
||||
"branch" => "master",
|
||||
"cache" => "cache/",
|
||||
"save" => "",
|
||||
"prerelease" => false,
|
||||
|
||||
"exceptions" => false,
|
||||
);
|
||||
|
||||
protected $allRelease = array();
|
||||
protected $streamContext = null;
|
||||
|
||||
public function __construct($option)
|
||||
{
|
||||
//options
|
||||
if (is_array($option)) {
|
||||
if (!isset($option['name'])) {
|
||||
throw new \Exception('No Name in Option Set');
|
||||
}
|
||||
$this->options = $option + $this->options;
|
||||
} elseif (is_string($option)) {
|
||||
$this->options['name'] = $option;
|
||||
} else {
|
||||
throw new \Exception('No Option Set');
|
||||
}
|
||||
|
||||
$this->options['save'] = rtrim($this->options['save'], '/');
|
||||
if ($this->options['save'] !== '') {
|
||||
$this->options['save'] .= '/';
|
||||
if (!HelperClass::fileExists($this->options['save'])) {
|
||||
mkdir($this->options['save']);
|
||||
}
|
||||
}
|
||||
$this->options['cache'] = $this->options['save'] . rtrim($this->options['cache'], '/');
|
||||
if ($this->options['cache'] !== '') {
|
||||
$this->options['cache'] .= '/';
|
||||
if (!HelperClass::fileExists($this->options['cache'])) {
|
||||
mkdir($this->options['cache']);
|
||||
}
|
||||
}
|
||||
$caBundleDir = dirname(__FILE__);
|
||||
if (HelperClass::isInPhar()) {
|
||||
$caBundleDir = dirname($_SERVER["SCRIPT_FILENAME"]) . "/" . $this->options['cache'];
|
||||
if (!HelperClass::fileExists($this->options['cache'] . "ca_bundle.crt")) {
|
||||
copy(dirname(__FILE__) . "/ca_bundle.crt", $caBundleDir . "ca_bundle.crt");
|
||||
}
|
||||
}
|
||||
|
||||
$this->cachedInfo = new CacheOneFile(dirname($_SERVER["SCRIPT_FILENAME"]) . "/" . $this->options['cache'] . $this->options['cacheFile'], $this->options['holdTime']);
|
||||
|
||||
$this->streamContext = stream_context_create(
|
||||
array(
|
||||
'http' => array(
|
||||
'header' => "User-Agent: Awesome-Update-My-Self-" . $this->options['name'] . "\r\nAccept: application/vnd.github.v3+json\r\n",
|
||||
),
|
||||
'ssl' => array(
|
||||
'cafile' => $caBundleDir . '/ca_bundle.crt',
|
||||
'verify_peer' => true,
|
||||
),
|
||||
)
|
||||
);
|
||||
$this->streamContext2 = stream_context_create(
|
||||
array(
|
||||
'http' => array(
|
||||
'header' => "User-Agent: Awesome-Update-My-Self-" . $this->options['name'] . "\r\n",
|
||||
),
|
||||
'ssl' => array(
|
||||
'cafile' => $caBundleDir . '/ca_bundle.crt',
|
||||
'verify_peer' => true,
|
||||
),
|
||||
)
|
||||
);
|
||||
$this->allRelease = $this->getRemoteInfos();
|
||||
}
|
||||
|
||||
protected function getRemoteInfos()
|
||||
{
|
||||
$path = "https://api.github.com/repos/" . $this->options['name'] . "/releases";
|
||||
if ($this->cachedInfo->is()) {
|
||||
$fileContent = $this->cachedInfo->get();
|
||||
} else {
|
||||
if (!in_array('https', stream_get_wrappers())) {
|
||||
if ($this->options["exceptions"]) {
|
||||
throw new \Exception("No HTTPS Wrapper Exception");
|
||||
} else {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
$fileContent = @file_get_contents($path, false, $this->streamContext);
|
||||
|
||||
if ($fileContent === false) {
|
||||
if ($this->options["exceptions"]) {
|
||||
throw new \Exception("No Internet Exception");
|
||||
} else {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
$json = json_decode($fileContent, true);
|
||||
if (isset($json['message'])) {
|
||||
if ($this->options["exceptions"]) {
|
||||
throw new \Exception("API Exception[" . $json['message'] . "]");
|
||||
} else {
|
||||
$json = array();
|
||||
}
|
||||
}
|
||||
if (defined("JSON_PRETTY_PRINT")) {
|
||||
$fileContent = json_encode($json, JSON_PRETTY_PRINT);
|
||||
} else {
|
||||
$fileContent = json_encode($json);
|
||||
}
|
||||
$this->cachedInfo->set($fileContent);
|
||||
|
||||
return $json;
|
||||
}
|
||||
|
||||
return json_decode($fileContent, true);
|
||||
}
|
||||
|
||||
public function able()
|
||||
{
|
||||
if (!in_array('https', stream_get_wrappers())) {
|
||||
return false;
|
||||
}
|
||||
if (empty($this->allRelease)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->getNewestInfo();
|
||||
|
||||
if (HelperClass::fileExists($this->options['cache'] . $this->options['versionFile'])) {
|
||||
$fileContent = file_get_contents($this->options['cache'] . $this->options['versionFile']);
|
||||
$current = json_decode($fileContent, true);
|
||||
|
||||
if (isset($current['id']) && $current['id'] == $this->newestInfo['id']) {
|
||||
return false;
|
||||
}
|
||||
if (isset($current['tag_name']) && $current['tag_name'] == $this->newestInfo['tag_name']) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function update()
|
||||
{
|
||||
$newestRelease = $this->getNewestInfo();
|
||||
if ($this->able()) {
|
||||
if ($this->download($newestRelease['zipball_url'])) {
|
||||
if ($this->unZip()) {
|
||||
unlink($this->options['cache'] . $this->options['zipFile']);
|
||||
if (defined("JSON_PRETTY_PRINT")) {
|
||||
file_put_contents($this->options['cache'] . $this->options['versionFile'], json_encode(array(
|
||||
"id" => $newestRelease['id'],
|
||||
"tag_name" => $newestRelease['tag_name']
|
||||
), JSON_PRETTY_PRINT));
|
||||
} else {
|
||||
file_put_contents($this->options['cache'] . $this->options['versionFile'], json_encode(array(
|
||||
"id" => $newestRelease['id'],
|
||||
"tag_name" => $newestRelease['tag_name']
|
||||
)));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function download($url)
|
||||
{
|
||||
$file = @fopen($url, 'r', false, $this->streamContext2);
|
||||
if ($file == false) {
|
||||
if ($this->options["exceptions"]) {
|
||||
throw new \Exception("Download faild Exception");
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
file_put_contents(
|
||||
dirname($_SERVER['SCRIPT_FILENAME']) . "/" . $this->options['cache'] . $this->options['zipFile'],
|
||||
$file
|
||||
);
|
||||
fclose($file);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function unZip()
|
||||
{
|
||||
$path = dirname($_SERVER['SCRIPT_FILENAME']) . "/" . $this->options['cache'] . $this->options['zipFile'];
|
||||
$updateIgnore = array();
|
||||
if (HelperClass::fileExists($this->options['updateignore'])) {
|
||||
$updateIgnore = file($this->options['updateignore']);
|
||||
foreach ($updateIgnore as &$ignore) {
|
||||
$ignore = $this->options['save'] . trim($ignore);
|
||||
}
|
||||
}
|
||||
|
||||
$zip = new \ZipArchive();
|
||||
if ($zip->open($path) === true) {
|
||||
$cutLength = strlen($zip->getNameIndex(0));
|
||||
for ($i = 1; $i < $zip->numFiles; $i++) {//iterate throw the Zip
|
||||
$name = $this->options['save'] . substr($zip->getNameIndex($i), $cutLength);
|
||||
|
||||
$do = true;
|
||||
|
||||
foreach ($updateIgnore as $ignore) {
|
||||
if (substr($name, 0, strlen($ignore)) == $ignore) {
|
||||
$do = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($do) {
|
||||
$stat = $zip->statIndex($i);
|
||||
if ($stat["crc"] == 0) {
|
||||
if (!HelperClass::fileExists($name)) {
|
||||
mkdir($name);
|
||||
}
|
||||
} else {
|
||||
copy("zip://" . $path . "#" . $zip->getNameIndex($i), $name);
|
||||
}
|
||||
}
|
||||
}
|
||||
$zip->close();
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCurrentInfo()
|
||||
{
|
||||
if (isset($this->currentInfo)) {
|
||||
return $this->currentInfo;
|
||||
}
|
||||
|
||||
$this->currentInfo = null;
|
||||
if (HelperClass::fileExists($this->options['cache'] . $this->options['versionFile'])) {
|
||||
$fileContent = file_get_contents($this->options['cache'] . $this->options['versionFile']);
|
||||
$current = json_decode($fileContent, true);
|
||||
|
||||
foreach ($this->allRelease as $release) {
|
||||
if (isset($current['id']) && $current['id'] == $release['id']) {
|
||||
$this->currentInfo = $release;
|
||||
break;
|
||||
}
|
||||
if (isset($current['tag_name']) && $current['tag_name'] == $release['tag_name']) {
|
||||
$this->currentInfo = $release;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->currentInfo;
|
||||
}
|
||||
|
||||
public function getNewestInfo()
|
||||
{
|
||||
if (isset($this->newestInfo)) {
|
||||
return $this->newestInfo;
|
||||
}
|
||||
|
||||
foreach ($this->allRelease as $release) {
|
||||
if (!$this->options['prerelease'] && $release['prerelease']) {
|
||||
continue;
|
||||
}
|
||||
if ($this->options['branch'] !== $release['target_commitish']) {
|
||||
continue;
|
||||
}
|
||||
$this->newestInfo = $release;
|
||||
break;
|
||||
}
|
||||
return $this->newestInfo;
|
||||
}
|
||||
}
|
||||
122
system/vendor/kanti/hub-updater/README.md
vendored
122
system/vendor/kanti/hub-updater/README.md
vendored
|
|
@ -1,122 +0,0 @@
|
|||
#HubUpdater
|
||||
 
|
||||
|
||||
Simple Github Updater for Web Projects [PHP]
|
||||
|
||||
## is HubUpdater for me? [Checklist]
|
||||
|
||||
- [ ] I have an little product/projekt on github. (~ <=30MB)
|
||||
- [ ] it can run PHP and uses [composer](https://getcomposer.org/)s autoloader
|
||||
- [ ] I want my users to update my Product with one click
|
||||
|
||||
## check for an update [simple]
|
||||
|
||||
```php
|
||||
<?php
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
$updater = new \Kanti\HubUpdater('kanti/test');
|
||||
$updater->update();
|
||||
```
|
||||
|
||||
## how to provide an update?
|
||||
|
||||
- Go to your Repository on github.com ‣‣
|
||||
- click on the ``releases`` tab ‣‣
|
||||
- click on ``Draft a new release`` ‣‣
|
||||
- Enter your release details ‣‣
|
||||
- click on ``Publish release`` ‣‣
|
||||
- now you can use HubUpdater to update to the newest version.
|
||||
- _note: <sub>The timestamp of the release is used. NOT the version number!!</sub>_
|
||||
|
||||
|
||||
## install via composer
|
||||
|
||||
The recommended way to install hub-updater is through
|
||||
[Composer](http://getcomposer.org).
|
||||
|
||||
```bash
|
||||
# Install Composer
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
```
|
||||
|
||||
Next, run the Composer command to install the latest stable version of HubUpdater:
|
||||
|
||||
```bash
|
||||
composer require kanti/hub-updater ~0.3
|
||||
```
|
||||
|
||||
After installing, you need to require Composer's autoloader:
|
||||
|
||||
```php
|
||||
<?php
|
||||
require 'vendor/autoload.php';
|
||||
```
|
||||
|
||||
|
||||
## settings
|
||||
```php
|
||||
$settings = array(
|
||||
"settingsKey" => 'value',
|
||||
);
|
||||
new \Kanti\HubUpdater($settings);
|
||||
```
|
||||
|setting|description|default|
|
||||
|---|---|---|
|
||||
|name|the name your Repository has |**must be set**|
|
||||
|branch|the branch you like to watch. |``master``|
|
||||
|cache|the directory you like to put the cache stuff |``./cache/``|
|
||||
|save|the directory you like to put the content of the zip |``./``|
|
||||
|prerelease|would you like to download the prereleases? |``false``|
|
||||
|cacheFile|name of the InformationCacheFile(in cacheDir)|``downloadInfo.json``|
|
||||
|holdTime|time(seconds) the Cached-Information will be used|``43200``|
|
||||
|versionFile|name of the InstalledVersionInformation is safed(in cacheDir)|``installedVersion.json``|
|
||||
|zipFile|name of the temporary zip file(in cacheDir)|``tmpZipFile.zip``|
|
||||
|updateignore|name of the updateignore file(in root of project)|``.updateignore``|
|
||||
|exceptions|if true, will ``throw new \Exception`` on failure|``false``|
|
||||
|
||||
## Check for an update [complete]
|
||||
```php
|
||||
<?php
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
$updater = new \Kanti\HubUpdater(array(
|
||||
"cacheFile" => "downloadInfo.json",//name of the InformationCacheFile(in cacheDir)
|
||||
"holdTime" => 43200,//time(seconds) the Cached-Information will be used
|
||||
|
||||
"versionFile" => "installedVersion.json",//name of the InstalledVersionInformation is safed(in cacheDir)
|
||||
"zipFile" => "tmpZipFile.zip",//name of the temporary zip file(in cacheDir)
|
||||
"updateignore" => ".updateignore",//name of the updateignore file(in root of project)
|
||||
|
||||
"name" => 'kanti/test',//Repository to watch
|
||||
"branch" => 'master',//wich branch to watch
|
||||
"cache" => 'cache/',//were to put the caching stuff
|
||||
"save" => 'save/',//there to put the downloaded Version[default ./]
|
||||
"prerelease" => true,//accept prereleases?
|
||||
|
||||
"exceptions" => true,//if true, will throw new \Exception on failure
|
||||
));
|
||||
if ($updater->able()) {
|
||||
if (isset($_GET['update'])) {
|
||||
$updater->update();
|
||||
echo '<p>updated :)</p>';
|
||||
} else {
|
||||
echo '<a href="?update">Update Me</a>'; //only update if they klick this link
|
||||
}
|
||||
} else {
|
||||
echo '<p>uptodate :)</p>';
|
||||
}
|
||||
|
||||
```
|
||||
## the .updateignore file
|
||||
### syntax:
|
||||
put a file in one line and it will not be updated. _note <sub>put the .updateignore in your projects root directory</sub>_
|
||||
```
|
||||
.htaccess
|
||||
favicon.ico
|
||||
there/the/config.ini/is.ini
|
||||
```
|
||||
|
||||
|
||||
## Thanks:
|
||||
- ca_bundle.crt form [bagder/ca-bundle](https://github.com/bagder/ca-bundle)
|
||||
3894
system/vendor/kanti/hub-updater/ca_bundle.crt
vendored
3894
system/vendor/kanti/hub-updater/ca_bundle.crt
vendored
File diff suppressed because it is too large
Load diff
974
system/vendor/kanti/hub-updater/composer.lock
generated
vendored
974
system/vendor/kanti/hub-updater/composer.lock
generated
vendored
|
|
@ -1,974 +0,0 @@
|
|||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "b8e4efa9ea29bd0bab50ed2191d4b9cb",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/instantiator.git",
|
||||
"reference": "3d9669e597439e8d205baf315efb757038fb4dea"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/3d9669e597439e8d205baf315efb757038fb4dea",
|
||||
"reference": "3d9669e597439e8d205baf315efb757038fb4dea",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3,<8.0-DEV"
|
||||
},
|
||||
"require-dev": {
|
||||
"athletic/athletic": "~0.1.8",
|
||||
"ext-pdo": "*",
|
||||
"ext-phar": "*",
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"squizlabs/php_codesniffer": "~2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Marco Pivetta",
|
||||
"email": "ocramius@gmail.com",
|
||||
"homepage": "http://ocramius.github.com/"
|
||||
}
|
||||
],
|
||||
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
|
||||
"homepage": "https://github.com/doctrine/instantiator",
|
||||
"keywords": [
|
||||
"constructor",
|
||||
"instantiate"
|
||||
],
|
||||
"time": "2015-01-16 19:29:51"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "fd0ac2007401505fb596fdfb859ec4e103d69e55"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/fd0ac2007401505fb596fdfb859ec4e103d69e55",
|
||||
"reference": "fd0ac2007401505fb596fdfb859ec4e103d69e55",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"dflydev/markdown": "~1.0",
|
||||
"erusev/parsedown": "~1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"phpDocumentor": [
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mike van Riel",
|
||||
"email": "mike.vanriel@naenius.com"
|
||||
}
|
||||
],
|
||||
"time": "2014-09-02 14:26:20"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "d647e27524f9f7edc37baf63a114b52f5975808f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/d647e27524f9f7edc37baf63a114b52f5975808f",
|
||||
"reference": "d647e27524f9f7edc37baf63a114b52f5975808f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.0.2",
|
||||
"phpdocumentor/reflection-docblock": "~2.0",
|
||||
"sebastian/comparator": "~1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "~2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Prophecy\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Konstantin Kudryashov",
|
||||
"email": "ever.zet@gmail.com",
|
||||
"homepage": "http://everzet.com"
|
||||
},
|
||||
{
|
||||
"name": "Marcello Duarte",
|
||||
"email": "marcello.duarte@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Highly opinionated mocking framework for PHP 5.3+",
|
||||
"homepage": "https://github.com/phpspec/prophecy",
|
||||
"keywords": [
|
||||
"Double",
|
||||
"Dummy",
|
||||
"fake",
|
||||
"mock",
|
||||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2015-01-26 10:50:16"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "34cc484af1ca149188d0d9e91412191e398e0b67"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/34cc484af1ca149188d0d9e91412191e398e0b67",
|
||||
"reference": "34cc484af1ca149188d0d9e91412191e398e0b67",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-file-iterator": "~1.3",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-token-stream": "~1.3",
|
||||
"sebastian/environment": "~1.0",
|
||||
"sebastian/version": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-xdebug": ">=2.1.4",
|
||||
"phpunit/phpunit": "~4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "*",
|
||||
"ext-xdebug": ">=2.2.1",
|
||||
"ext-xmlwriter": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
|
||||
"keywords": [
|
||||
"coverage",
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2015-01-24 10:06:35"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
"version": "1.3.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||
"reference": "acd690379117b042d1c8af1fafd61bde001bf6bb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb",
|
||||
"reference": "acd690379117b042d1c8af1fafd61bde001bf6bb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"File/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"include-path": [
|
||||
""
|
||||
],
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
|
||||
"keywords": [
|
||||
"filesystem",
|
||||
"iterator"
|
||||
],
|
||||
"time": "2013-10-10 15:34:57"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-text-template",
|
||||
"version": "1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
||||
"reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
|
||||
"reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"Text/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"include-path": [
|
||||
""
|
||||
],
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Simple template engine.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
|
||||
"keywords": [
|
||||
"template"
|
||||
],
|
||||
"time": "2014-01-30 17:20:04"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-timer",
|
||||
"version": "1.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
||||
"reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
|
||||
"reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"PHP/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"include-path": [
|
||||
""
|
||||
],
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Utility class for timing",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-timer/",
|
||||
"keywords": [
|
||||
"timer"
|
||||
],
|
||||
"time": "2013-08-02 07:42:54"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-token-stream",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
||||
"reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/db32c18eba00b121c145575fcbcd4d4d24e6db74",
|
||||
"reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-tokenizer": "*",
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Wrapper around PHP's tokenizer extension.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
|
||||
"keywords": [
|
||||
"tokenizer"
|
||||
],
|
||||
"time": "2015-01-17 09:51:32"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "e85198bbce24ea11075ce8bdfc2cfffb818aae8c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e85198bbce24ea11075ce8bdfc2cfffb818aae8c",
|
||||
"reference": "e85198bbce24ea11075ce8bdfc2cfffb818aae8c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-reflection": "*",
|
||||
"ext-spl": "*",
|
||||
"php": ">=5.3.3",
|
||||
"phpspec/prophecy": "~1.3.1",
|
||||
"phpunit/php-code-coverage": "~2.0",
|
||||
"phpunit/php-file-iterator": "~1.3",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-timer": "~1.0",
|
||||
"phpunit/phpunit-mock-objects": "~2.3",
|
||||
"sebastian/comparator": "~1.1",
|
||||
"sebastian/diff": "~1.2",
|
||||
"sebastian/environment": "~1.2",
|
||||
"sebastian/exporter": "~1.2",
|
||||
"sebastian/global-state": "~1.0",
|
||||
"sebastian/version": "~1.0",
|
||||
"symfony/yaml": "~2.1|~3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"phpunit/php-invoker": "~1.1"
|
||||
},
|
||||
"bin": [
|
||||
"phpunit"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.6.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "The PHP Unit Testing framework.",
|
||||
"homepage": "https://phpunit.de/",
|
||||
"keywords": [
|
||||
"phpunit",
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2015-01-27 07:32:25"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
|
||||
"reference": "b752b41e3fead4feee99f3a2f2972cef517abb8b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b752b41e3fead4feee99f3a2f2972cef517abb8b",
|
||||
"reference": "b752b41e3fead4feee99f3a2f2972cef517abb8b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "~1.0,>=1.0.2",
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-text-template": "~1.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "4.4.*@dev"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-soap": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.4.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Mock Object library for PHPUnit",
|
||||
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
|
||||
"keywords": [
|
||||
"mock",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2015-01-18 10:44:19"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||
"reference": "6a1e846331bb3cc1a305168125d047fb86260e3d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1e846331bb3cc1a305168125d047fb86260e3d",
|
||||
"reference": "6a1e846331bb3cc1a305168125d047fb86260e3d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"sebastian/diff": "~1.1",
|
||||
"sebastian/exporter": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jeff Welch",
|
||||
"email": "whatthejeff@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Volker Dusch",
|
||||
"email": "github@wallbash.com"
|
||||
},
|
||||
{
|
||||
"name": "Bernhard Schussek",
|
||||
"email": "bschussek@2bepublished.at"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Provides the functionality to compare PHP values for equality",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/comparator",
|
||||
"keywords": [
|
||||
"comparator",
|
||||
"compare",
|
||||
"equality"
|
||||
],
|
||||
"time": "2015-01-05 16:29:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/diff",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/diff.git",
|
||||
"reference": "6dc90302a4cdf8486c221a0ad3a4da53859fcfa5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/6dc90302a4cdf8486c221a0ad3a4da53859fcfa5",
|
||||
"reference": "6dc90302a4cdf8486c221a0ad3a4da53859fcfa5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kore Nordmann",
|
||||
"email": "mail@kore-nordmann.de"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Diff implementation",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/diff",
|
||||
"keywords": [
|
||||
"diff"
|
||||
],
|
||||
"time": "2015-01-01 09:20:29"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||
"reference": "5a8c7d31914337b69923db26c4221b81ff5a196e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e",
|
||||
"reference": "5a8c7d31914337b69923db26c4221b81ff5a196e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Provides functionality to handle HHVM/PHP environments",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/environment",
|
||||
"keywords": [
|
||||
"Xdebug",
|
||||
"environment",
|
||||
"hhvm"
|
||||
],
|
||||
"time": "2015-01-01 10:01:08"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||
"reference": "84839970d05254c73cde183a721c7af13aede943"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943",
|
||||
"reference": "84839970d05254c73cde183a721c7af13aede943",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"sebastian/recursion-context": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jeff Welch",
|
||||
"email": "whatthejeff@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Volker Dusch",
|
||||
"email": "github@wallbash.com"
|
||||
},
|
||||
{
|
||||
"name": "Bernhard Schussek",
|
||||
"email": "bschussek@2bepublished.at"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
},
|
||||
{
|
||||
"name": "Adam Harvey",
|
||||
"email": "aharvey@php.net"
|
||||
}
|
||||
],
|
||||
"description": "Provides the functionality to export PHP variables for visualization",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/exporter",
|
||||
"keywords": [
|
||||
"export",
|
||||
"exporter"
|
||||
],
|
||||
"time": "2015-01-27 07:23:06"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/global-state.git",
|
||||
"reference": "007c441df427cf0e175372fcbb9d196bce7eb743"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/007c441df427cf0e175372fcbb9d196bce7eb743",
|
||||
"reference": "007c441df427cf0e175372fcbb9d196bce7eb743",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.2"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-uopz": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Snapshotting of global state",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/global-state",
|
||||
"keywords": [
|
||||
"global state"
|
||||
],
|
||||
"time": "2015-01-20 04:09:31"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/recursion-context",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/recursion-context.git",
|
||||
"reference": "3989662bbb30a29d20d9faa04a846af79b276252"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252",
|
||||
"reference": "3989662bbb30a29d20d9faa04a846af79b276252",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jeff Welch",
|
||||
"email": "whatthejeff@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
},
|
||||
{
|
||||
"name": "Adam Harvey",
|
||||
"email": "aharvey@php.net"
|
||||
}
|
||||
],
|
||||
"description": "Provides functionality to recursively process PHP variables",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
|
||||
"time": "2015-01-24 09:48:32"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/version",
|
||||
"version": "1.0.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/version.git",
|
||||
"reference": "a77d9123f8e809db3fbdea15038c27a95da4058b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/a77d9123f8e809db3fbdea15038c27a95da4058b",
|
||||
"reference": "a77d9123f8e809db3fbdea15038c27a95da4058b",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
||||
"homepage": "https://github.com/sebastianbergmann/version",
|
||||
"time": "2014-12-15 14:25:24"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "dev-master",
|
||||
"target-dir": "Symfony/Component/Yaml",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Yaml.git",
|
||||
"reference": "13ef40ee1437582f86fa805445363d0c694dae3a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Yaml/zipball/13ef40ee1437582f86fa805445363d0c694dae3a",
|
||||
"reference": "13ef40ee1437582f86fa805445363d0c694dae3a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Symfony\\Component\\Yaml\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "http://symfony.com/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2015-01-25 04:42:01"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": {
|
||||
"phpunit/phpunit": 20
|
||||
},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"platform-dev": []
|
||||
}
|
||||
5
system/vendor/kanti/hub-updater/example.php
vendored
5
system/vendor/kanti/hub-updater/example.php
vendored
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
$updater = new \Kanti\HubUpdater('kanti/test');
|
||||
$updater->update();
|
||||
29
system/vendor/kanti/hub-updater/example2.php
vendored
29
system/vendor/kanti/hub-updater/example2.php
vendored
|
|
@ -1,29 +0,0 @@
|
|||
<?php
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
$updater = new \Kanti\HubUpdater(array(
|
||||
"cacheFile" => "downloadInfo.json",//name of the InformationCacheFile(in cacheDir)
|
||||
"holdTime" => 43200,//time(seconds) the Cached-Information will be used
|
||||
|
||||
"versionFile" => "installedVersion.json",//name of the InstalledVersionInformation is safed(in cacheDir)
|
||||
"zipFile" => "tmpZipFile.zip",//name of the temporary zip file(in cacheDir)
|
||||
"updateignore" => ".updateignore",//name of the updateignore file(in root of project)
|
||||
|
||||
"name" => 'kanti/test',//Repository to watch
|
||||
"branch" => 'master',//wich branch to watch
|
||||
"cache" => 'cache/',//were to put the caching stuff
|
||||
"save" => 'save/',//there to put the downloaded Version[default ./]
|
||||
"prerelease" => true,//accept prereleases?
|
||||
|
||||
"exceptions" => true,//if true, will throw new \Exception on failure
|
||||
));
|
||||
if ($updater->able()) {
|
||||
if (isset($_GET['update'])) {
|
||||
$updater->update();
|
||||
echo '<p>updated :)</p>';
|
||||
} else {
|
||||
echo '<a href="?update">Update Me</a>'; //only update if they klick this link
|
||||
}
|
||||
} else {
|
||||
echo '<p>uptodate :)</p>';
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Matthias
|
||||
* Date: 27.01.2015
|
||||
* Time: 08:55
|
||||
*/
|
||||
|
||||
namespace Kanti\Test;
|
||||
|
||||
use Kanti\CacheOneFile;
|
||||
|
||||
class CacheOneFileTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
private $invalidContent = [
|
||||
true,
|
||||
false,
|
||||
array('content'),
|
||||
];
|
||||
|
||||
private $validContent = [
|
||||
'',
|
||||
'a',
|
||||
'ab',
|
||||
'abc',
|
||||
1,
|
||||
12,
|
||||
123,
|
||||
];
|
||||
|
||||
public function testIs()
|
||||
{
|
||||
$fileName = __DIR__ . "/asserts/testfile.txt";
|
||||
$time = 60*60;//1h
|
||||
if(file_exists($fileName)){
|
||||
unlink($fileName);
|
||||
}
|
||||
$cache = new CacheOneFile($fileName,$time);
|
||||
if($cache->is()){
|
||||
$this->fail("is not set");
|
||||
}
|
||||
|
||||
touch($fileName);
|
||||
if(! $cache->is()){
|
||||
$this->fail("could not set");
|
||||
}
|
||||
touch($fileName,0);
|
||||
if($cache->is()){
|
||||
$this->fail("does not reset");
|
||||
}
|
||||
}
|
||||
|
||||
public function testGet(){
|
||||
$fileName = __DIR__ . "/asserts/testfile.txt";
|
||||
$time = 60*60;//1h
|
||||
$cache = new CacheOneFile($fileName,$time);
|
||||
|
||||
foreach ($this->validContent as $value) {
|
||||
$cache->set($value);
|
||||
if($cache->get() !== (string)$value){
|
||||
$this->fail("get set dosen't match for value{" . print_r($value,true) . "}");
|
||||
}
|
||||
}
|
||||
unlink($fileName);
|
||||
foreach ($this->invalidContent as $value) {
|
||||
$cache->set($value);
|
||||
if($cache->get() === $value){
|
||||
$this->fail("get set does match for value{" . print_r($value,true) . "}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Matthias
|
||||
* Date: 27.01.2015
|
||||
* Time: 08:41
|
||||
*/
|
||||
|
||||
namespace Kanti\Test;
|
||||
|
||||
use Kanti\HelperClass;
|
||||
|
||||
class HelperClassTest extends \PHPUnit_Framework_TestCase {
|
||||
|
||||
private $invalidFileNames = [
|
||||
true,
|
||||
false,
|
||||
array('array'),
|
||||
];
|
||||
|
||||
private $validFileNames = [
|
||||
'',
|
||||
'a',
|
||||
'ab',
|
||||
'abc',
|
||||
1,
|
||||
12,
|
||||
123,
|
||||
];
|
||||
|
||||
public function testStaticFileExists()
|
||||
{
|
||||
foreach ($this->invalidFileNames as $value) {
|
||||
try {
|
||||
HelperClass::fileExists($value);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
// Good, we got an exception!
|
||||
continue;
|
||||
}
|
||||
$this->fail('Expected exception not raised on value: "' . $value . '".');
|
||||
}
|
||||
|
||||
foreach ($this->validFileNames as $value) {
|
||||
HelperClass::fileExists($value);
|
||||
}
|
||||
}
|
||||
|
||||
public function testIsInPhar(){
|
||||
if(HelperClass::isInPhar()){
|
||||
$this->fail("unit test is in phar?");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
content
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
ini_set('error_reporting', E_ALL); // or error_reporting(E_ALL);
|
||||
ini_set('display_errors', '1');
|
||||
ini_set('display_startup_errors', '1');
|
||||
|
||||
$_SERVER['SCRIPT_FILENAME'] = dirname(__DIR__) . "\index.php";
|
||||
chdir(dirname(__DIR__));
|
||||
|
||||
require_once __DIR__ . "/../vendor/autoload.php";
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit bootstrap="bootstrap.php"
|
||||
backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
colors="true"
|
||||
verbose="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false">
|
||||
<testsuites>
|
||||
<testsuite name="Hub-Updater Test Suite">
|
||||
<directory>./</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">../src/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<logging>
|
||||
<log type="tap" target="../build/report.tap"/>
|
||||
<log type="junit" target="../build/report.junit.xml"/>
|
||||
<log type="coverage-html" target="../build/coverage" charset="UTF-8" yui="true" highlight="true"/>
|
||||
<log type="coverage-text" target="../build/coverage.txt"/>
|
||||
<log type="coverage-clover" target="../build/logs/clover.xml"/>
|
||||
</logging>
|
||||
</phpunit>
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
use \Suin\RSSWriter\SimpleXMLElement;
|
||||
|
||||
class Channel implements \Suin\RSSWriter\ChannelInterface
|
||||
{
|
||||
/** @var string */
|
||||
protected $title;
|
||||
/** @var string */
|
||||
protected $url;
|
||||
/** @var string */
|
||||
protected $description;
|
||||
/** @var string */
|
||||
protected $language;
|
||||
/** @var string */
|
||||
protected $copyright;
|
||||
/** @var int */
|
||||
protected $pubDate;
|
||||
/** @var int */
|
||||
protected $lastBuildDate;
|
||||
/** @var int */
|
||||
protected $ttl;
|
||||
/** @var \Suin\RSSWriter\ItemInterface[] */
|
||||
protected $items = array();
|
||||
|
||||
/**
|
||||
* Set channel title
|
||||
* @param string $title
|
||||
* @return $this
|
||||
*/
|
||||
public function title($title)
|
||||
{
|
||||
$this->title = $title;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set channel URL
|
||||
* @param string $url
|
||||
* @return $this
|
||||
*/
|
||||
public function url($url)
|
||||
{
|
||||
$this->url = $url;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set channel description
|
||||
* @param string $description
|
||||
* @return $this
|
||||
*/
|
||||
public function description($description)
|
||||
{
|
||||
$this->description = $description;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set ISO639 language code
|
||||
*
|
||||
* The language the channel is written in. This allows aggregators to group all
|
||||
* Italian language sites, for example, on a single page. A list of allowable
|
||||
* values for this element, as provided by Netscape, is here. You may also use
|
||||
* values defined by the W3C.
|
||||
*
|
||||
* @param string $language
|
||||
* @return $this
|
||||
*/
|
||||
public function language($language)
|
||||
{
|
||||
$this->language = $language;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set channel copyright
|
||||
* @param string $copyright
|
||||
* @return $this
|
||||
*/
|
||||
public function copyright($copyright)
|
||||
{
|
||||
$this->copyright = $copyright;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set channel published date
|
||||
* @param int $pubDate Unix timestamp
|
||||
* @return $this
|
||||
*/
|
||||
public function pubDate($pubDate)
|
||||
{
|
||||
$this->pubDate = $pubDate;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set channel last build date
|
||||
* @param int $lastBuildDate Unix timestamp
|
||||
* @return $this
|
||||
*/
|
||||
public function lastBuildDate($lastBuildDate)
|
||||
{
|
||||
$this->lastBuildDate = $lastBuildDate;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set channel ttl (minutes)
|
||||
* @param int $ttl
|
||||
* @return $this
|
||||
*/
|
||||
public function ttl($ttl)
|
||||
{
|
||||
$this->ttl = $ttl;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add item object
|
||||
* @param \Suin\RSSWriter\ItemInterface $item
|
||||
* @return $this
|
||||
*/
|
||||
public function addItem(ItemInterface $item)
|
||||
{
|
||||
$this->items[] = $item;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append to feed
|
||||
* @param \Suin\RSSWriter\FeedInterface $feed
|
||||
* @return $this
|
||||
*/
|
||||
public function appendTo(FeedInterface $feed)
|
||||
{
|
||||
$feed->addChannel($this);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return XML object
|
||||
* @return \Suin\RSSWriter\SimpleXMLElement
|
||||
*/
|
||||
public function asXML()
|
||||
{
|
||||
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" ?><channel></channel>', LIBXML_NOERROR|LIBXML_ERR_NONE|LIBXML_ERR_FATAL);
|
||||
$xml->addChild('title', $this->title);
|
||||
$xml->addChild('link', $this->url);
|
||||
$xml->addChild('description', $this->description);
|
||||
|
||||
if ( $this->language !== null )
|
||||
{
|
||||
$xml->addChild('language', $this->language);
|
||||
}
|
||||
|
||||
if ( $this->copyright !== null )
|
||||
{
|
||||
$xml->addChild('copyright', $this->copyright);
|
||||
}
|
||||
|
||||
if ( $this->pubDate !== null )
|
||||
{
|
||||
$xml->addChild('pubDate', date(DATE_RSS, $this->pubDate));
|
||||
}
|
||||
|
||||
if ( $this->lastBuildDate !== null )
|
||||
{
|
||||
$xml->addChild('lastBuildDate', date(DATE_RSS, $this->lastBuildDate));
|
||||
}
|
||||
|
||||
if ( $this->ttl !== null )
|
||||
{
|
||||
$xml->addChild('ttl', $this->ttl);
|
||||
}
|
||||
|
||||
foreach ( $this->items as $item )
|
||||
{
|
||||
$toDom = dom_import_simplexml($xml);
|
||||
$fromDom = dom_import_simplexml($item->asXML());
|
||||
$toDom->appendChild($toDom->ownerDocument->importNode($fromDom, true));
|
||||
}
|
||||
|
||||
return $xml;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
use \Suin\RSSWriter\FeedInterface;
|
||||
use \Suin\RSSWriter\ItemInterface;
|
||||
|
||||
interface ChannelInterface
|
||||
{
|
||||
/**
|
||||
* Set channel title
|
||||
* @param string $title
|
||||
* @return $this
|
||||
*/
|
||||
public function title($title);
|
||||
|
||||
/**
|
||||
* Set channel URL
|
||||
* @param string $url
|
||||
* @return $this
|
||||
*/
|
||||
public function url($url);
|
||||
|
||||
/**
|
||||
* Set channel description
|
||||
* @param string $description
|
||||
* @return $this
|
||||
*/
|
||||
public function description($description);
|
||||
|
||||
/**
|
||||
* Set ISO639 language code
|
||||
*
|
||||
* The language the channel is written in. This allows aggregators to group all
|
||||
* Italian language sites, for example, on a single page. A list of allowable
|
||||
* values for this element, as provided by Netscape, is here. You may also use
|
||||
* values defined by the W3C.
|
||||
*
|
||||
* @param string $language
|
||||
* @return $this
|
||||
*/
|
||||
public function language($language);
|
||||
|
||||
/**
|
||||
* Set channel copyright
|
||||
* @param string $copyright
|
||||
* @return $this
|
||||
*/
|
||||
public function copyright($copyright);
|
||||
|
||||
/**
|
||||
* Set channel published date
|
||||
* @param int $pubDate Unix timestamp
|
||||
* @return $this
|
||||
*/
|
||||
public function pubDate($pubDate);
|
||||
|
||||
/**
|
||||
* Set channel last build date
|
||||
* @param int $lastBuildDate Unix timestamp
|
||||
* @return $this
|
||||
*/
|
||||
public function lastBuildDate($lastBuildDate);
|
||||
|
||||
/**
|
||||
* Set channel ttl (minutes)
|
||||
* @param int $ttl
|
||||
* @return $this
|
||||
*/
|
||||
public function ttl($ttl);
|
||||
|
||||
/**
|
||||
* Add item object
|
||||
* @param \Suin\RSSWriter\ItemInterface $item
|
||||
* @return $this
|
||||
*/
|
||||
public function addItem(ItemInterface $item);
|
||||
|
||||
/**
|
||||
* Append to feed
|
||||
* @param \Suin\RSSWriter\FeedInterface $feed
|
||||
* @return $this
|
||||
*/
|
||||
public function appendTo(FeedInterface $feed);
|
||||
|
||||
/**
|
||||
* Return XML object
|
||||
* @return \Suin\RSSWriter\SimpleXMLElement
|
||||
*/
|
||||
public function asXML();
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
use \DOMDocument;
|
||||
use \Suin\RSSWriter\ChannelInterface;
|
||||
use \Suin\RSSWriter\SimpleXMLElement;
|
||||
|
||||
class Feed implements \Suin\RSSWriter\FeedInterface
|
||||
{
|
||||
/** @var \Suin\RSSWriter\ChannelInterface[] */
|
||||
protected $channels = array();
|
||||
|
||||
/**
|
||||
* Add channel
|
||||
* @param \Suin\RSSWriter\ChannelInterface $channel
|
||||
* @return $this
|
||||
*/
|
||||
public function addChannel(ChannelInterface $channel)
|
||||
{
|
||||
$this->channels[] = $channel;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render XML
|
||||
* @return string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" ?><rss version="2.0" />', LIBXML_NOERROR|LIBXML_ERR_NONE|LIBXML_ERR_FATAL);
|
||||
|
||||
foreach ( $this->channels as $channel )
|
||||
{
|
||||
$toDom = dom_import_simplexml($xml);
|
||||
$fromDom = dom_import_simplexml($channel->asXML());
|
||||
$toDom->appendChild($toDom->ownerDocument->importNode($fromDom, true));
|
||||
}
|
||||
|
||||
$dom = new DOMDocument('1.0', 'UTF-8');
|
||||
$dom->appendChild($dom->importNode(dom_import_simplexml($xml), true));
|
||||
$dom->formatOutput = true;
|
||||
return $dom->saveXML();
|
||||
}
|
||||
|
||||
/**
|
||||
* Render XML
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return $this->render();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
use \Suin\RSSWriter\ChannelInterface;
|
||||
|
||||
interface FeedInterface
|
||||
{
|
||||
/**
|
||||
* Add channel
|
||||
* @param \Suin\RSSWriter\ChannelInterface $channel
|
||||
* @return $thisJ
|
||||
*/
|
||||
public function addChannel(ChannelInterface $channel);
|
||||
|
||||
/**
|
||||
* Render XML
|
||||
* @return string
|
||||
*/
|
||||
public function render();
|
||||
|
||||
/**
|
||||
* Render XML
|
||||
* @return string
|
||||
*/
|
||||
public function __toString();
|
||||
}
|
||||
|
|
@ -1,169 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
use \Suin\RSSWriter\SimpleXMLElement;
|
||||
|
||||
class Item implements \Suin\RSSWriter\ItemInterface
|
||||
{
|
||||
/** @var string */
|
||||
protected $title;
|
||||
/** @var string */
|
||||
protected $url;
|
||||
/** @var string */
|
||||
protected $description;
|
||||
/** @var array */
|
||||
protected $categories = array();
|
||||
/** @var string */
|
||||
protected $guid;
|
||||
/** @var bool */
|
||||
protected $isPermalink;
|
||||
/** @var int */
|
||||
protected $pubDate;
|
||||
/** @var array */
|
||||
protected $enclosure;
|
||||
|
||||
/**
|
||||
* Set item title
|
||||
* @param string $title
|
||||
* @return $this
|
||||
*/
|
||||
public function title($title)
|
||||
{
|
||||
$this->title = $title;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set item URL
|
||||
* @param string $url
|
||||
* @return $this
|
||||
*/
|
||||
public function url($url)
|
||||
{
|
||||
$this->url = $url;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set item description
|
||||
* @param string $description
|
||||
* @return $this
|
||||
*/
|
||||
public function description($description)
|
||||
{
|
||||
$this->description = $description;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set item category
|
||||
* @param string $name Category name
|
||||
* @param string $domain Category URL
|
||||
* @return $this
|
||||
*/
|
||||
public function category($name, $domain = null)
|
||||
{
|
||||
$this->categories[] = array($name, $domain);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set GUID
|
||||
* @param string $guid
|
||||
* @param bool $isPermalink
|
||||
* @return $this
|
||||
*/
|
||||
public function guid($guid, $isPermalink = false)
|
||||
{
|
||||
$this->guid = $guid;
|
||||
$this->isPermalink = $isPermalink;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set published date
|
||||
* @param int $pubDate Unix timestamp
|
||||
* @return $this
|
||||
*/
|
||||
public function pubDate($pubDate)
|
||||
{
|
||||
$this->pubDate = $pubDate;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set enclosure
|
||||
* @param var $url Url to media file
|
||||
* @param int $length Length in bytes of the media file
|
||||
* @param var $type Media type, default is audio/mpeg
|
||||
* @return $this
|
||||
*/
|
||||
public function enclosure($url, $length = 0, $type = 'audio/mpeg')
|
||||
{
|
||||
$this->enclosure = array('url' => $url, 'length' => $length, 'type' => $type);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append item to the channel
|
||||
* @param \Suin\RSSWriter\ChannelInterface $channel
|
||||
* @return $this
|
||||
*/
|
||||
public function appendTo(ChannelInterface $channel)
|
||||
{
|
||||
$channel->addItem($this);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return XML object
|
||||
* @return \Suin\RSSWriter\SimpleXMLElement
|
||||
*/
|
||||
public function asXML()
|
||||
{
|
||||
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" ?><item></item>', LIBXML_NOERROR|LIBXML_ERR_NONE|LIBXML_ERR_FATAL);
|
||||
$xml->addChild('title', $this->title);
|
||||
$xml->addChild('link', $this->url);
|
||||
$xml->addChild('description', $this->description);
|
||||
|
||||
foreach ( $this->categories as $category )
|
||||
{
|
||||
$element = $xml->addChild('category', $category[0]);
|
||||
|
||||
if ( isset($category[1]) )
|
||||
{
|
||||
$element->addAttribute('domain', $category[1]);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->guid )
|
||||
{
|
||||
$guid = $xml->addChild('guid', $this->guid);
|
||||
|
||||
if ( $this->isPermalink )
|
||||
{
|
||||
$guid->addAttribute('isPermaLink', 'true');
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->pubDate !== null )
|
||||
{
|
||||
$xml->addChild('pubDate', date(DATE_RSS, $this->pubDate));
|
||||
}
|
||||
|
||||
|
||||
if (is_array($this->enclosure) && (count($this->enclosure) == 3))
|
||||
{
|
||||
$element = $xml->addChild('enclosure');
|
||||
$element->addAttribute('url', $this->enclosure['url']);
|
||||
$element->addAttribute('type', $this->enclosure['type']);
|
||||
|
||||
if ($this->enclosure['length'])
|
||||
{
|
||||
$element->addAttribute('length', $this->enclosure['length']);
|
||||
}
|
||||
}
|
||||
return $xml;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
use \Suin\RSSWriter\ChannelInterface;
|
||||
use \Suin\RSSWriter\SimpleXMLElement;
|
||||
|
||||
interface ItemInterface
|
||||
{
|
||||
/**
|
||||
* Set item title
|
||||
* @param string $title
|
||||
* @return $this
|
||||
*/
|
||||
public function title($title);
|
||||
|
||||
/**
|
||||
* Set item URL
|
||||
* @param string $url
|
||||
* @return $this
|
||||
*/
|
||||
public function url($url);
|
||||
|
||||
/**
|
||||
* Set item description
|
||||
* @param string $description
|
||||
* @return $this
|
||||
*/
|
||||
public function description($description);
|
||||
|
||||
/**
|
||||
* Set item category
|
||||
* @param string $name Category name
|
||||
* @param string $domain Category URL
|
||||
* @return $this
|
||||
*/
|
||||
public function category($name, $domain = null);
|
||||
|
||||
/**
|
||||
* Set GUID
|
||||
* @param string $guid
|
||||
* @param bool $isPermalink
|
||||
* @return $this
|
||||
*/
|
||||
public function guid($guid, $isPermalink = false);
|
||||
|
||||
/**
|
||||
* Set published date
|
||||
* @param int $pubDate Unix timestamp
|
||||
* @return $this
|
||||
*/
|
||||
public function pubDate($pubDate);
|
||||
|
||||
/**
|
||||
* Set enclosure
|
||||
* @param var $url Url to media file
|
||||
* @param int $length Length in bytes of the media file
|
||||
* @param var $type Media type, default is audio/mpeg
|
||||
* @return $this
|
||||
*/
|
||||
public function enclosure($url, $length = 0, $type = 'audio/mpeg');
|
||||
|
||||
/**
|
||||
* Append item to the channel
|
||||
* @param \Suin\RSSWriter\ChannelInterface $channel
|
||||
* @return $this
|
||||
*/
|
||||
public function appendTo(ChannelInterface $channel);
|
||||
|
||||
/**
|
||||
* Return XML object
|
||||
* @return \Suin\RSSWriter\SimpleXMLElement
|
||||
*/
|
||||
public function asXML();
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
class SimpleXMLElement extends \SimpleXMLElement
|
||||
{
|
||||
public function addChild($name, $value = null, $namespace = null)
|
||||
{
|
||||
if ( $value !== null and is_string($value) === true )
|
||||
{
|
||||
$value = str_replace('&', '&', $value);
|
||||
}
|
||||
|
||||
return parent::addChild($name, $value, $namespace);
|
||||
}
|
||||
}
|
||||
|
|
@ -143,7 +143,52 @@ class ItemTest extends TestCase
|
|||
<description>{$data['description']}</description>
|
||||
<category>{$data['categories'][0][0]}</category>
|
||||
<category domain=\"{$data['categories'][1][1]}\">{$data['categories'][1][0]}</category>
|
||||
<guid isPermaLink=\"true\">{$data['guid']}</guid>
|
||||
<guid>{$data['guid']}</guid>
|
||||
<pubDate>{$nowString}</pubDate>
|
||||
<enclosure url=\"{$data['enclosure']['url']}\" type=\"{$data['enclosure']['type']}\" length=\"{$data['enclosure']['length']}\"/>
|
||||
<author>{$data['author']}</author>
|
||||
</item>
|
||||
";
|
||||
$this->assertXmlStringEqualsXmlString($expect, $item->asXML()->asXML());
|
||||
}
|
||||
|
||||
public function testAsXML_false_permalink()
|
||||
{
|
||||
$now = time();
|
||||
$nowString = date(DATE_RSS, $now);
|
||||
|
||||
$data = array(
|
||||
'title' => "Venice Film Festival Tries to Quit Sinking",
|
||||
'url' => 'http://nytimes.com/2004/12/07FEST.html',
|
||||
'description' => "Some of the most heated chatter at the Venice Film Festival this week was about the way that the arrival of the stars at the Palazzo del Cinema was being staged.",
|
||||
'categories' => array(
|
||||
array("Grateful Dead", null),
|
||||
array("MSFT", 'http://www.fool.com/cusips'),
|
||||
),
|
||||
'guid' => "http://inessential.com/2002/09/01.php#a2",
|
||||
'isPermalink' => false,
|
||||
'pubDate' => $now,
|
||||
'enclosure' => array(
|
||||
'url' => 'http://link-to-audio-file.com/test.mp3',
|
||||
'length' => 4992,
|
||||
'type' => 'audio/mpeg'),
|
||||
'author' => 'Hidehito Nozawa aka Suin'
|
||||
);
|
||||
|
||||
$item = new Item();
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
$this->reveal($item)->attr($key, $value);
|
||||
}
|
||||
|
||||
$expect = "
|
||||
<item>
|
||||
<title>{$data['title']}</title>
|
||||
<link>{$data['url']}</link>
|
||||
<description>{$data['description']}</description>
|
||||
<category>{$data['categories'][0][0]}</category>
|
||||
<category domain=\"{$data['categories'][1][1]}\">{$data['categories'][1][0]}</category>
|
||||
<guid isPermaLink=\"false\">{$data['guid']}</guid>
|
||||
<pubDate>{$nowString}</pubDate>
|
||||
<enclosure url=\"{$data['enclosure']['url']}\" type=\"{$data['enclosure']['type']}\" length=\"{$data['enclosure']['length']}\"/>
|
||||
<author>{$data['author']}</author>
|
||||
|
|
|
|||
35
system/vendor/suin/php-rss-writer/example.php
vendored
35
system/vendor/suin/php-rss-writer/example.php
vendored
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
// Load test target classes
|
||||
spl_autoload_register(function($c) { @include_once strtr($c, '\\_', '//').'.php'; });
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__.'/Source');
|
||||
|
||||
use \Suin\RSSWriter\Feed;
|
||||
use \Suin\RSSWriter\Channel;
|
||||
use \Suin\RSSWriter\Item;
|
||||
|
||||
$feed = new Feed();
|
||||
|
||||
$channel = new Channel();
|
||||
$channel
|
||||
->title("Channel Title")
|
||||
->description("Channel Description")
|
||||
->url('http://blog.example.com')
|
||||
->language('en-US')
|
||||
->copyright('Copyright 2012, Foo Bar')
|
||||
->pubDate(strtotime('Tue, 21 Aug 2012 19:50:37 +0900'))
|
||||
->lastBuildDate(strtotime('Tue, 21 Aug 2012 19:50:37 +0900'))
|
||||
->ttl(60)
|
||||
->appendTo($feed);
|
||||
|
||||
$item = new Item();
|
||||
$item
|
||||
->title("Blog Entry Title")
|
||||
->description("<div>Blog body</div>")
|
||||
->url('http://blog.example.com/2012/08/21/blog-entry/')
|
||||
->pubDate(strtotime('Tue, 21 Aug 2012 19:50:37 +0900'))
|
||||
->guid('http://blog.example.com/2012/08/21/blog-entry/', true)
|
||||
->appendTo($channel);
|
||||
|
||||
|
||||
echo $feed; // or echo $feed->render();
|
||||
|
|
@ -108,8 +108,8 @@ class Item implements ItemInterface
|
|||
if ($this->guid) {
|
||||
$guid = $xml->addChild('guid', $this->guid);
|
||||
|
||||
if ($this->isPermalink) {
|
||||
$guid->addAttribute('isPermaLink', 'true');
|
||||
if ($this->isPermalink === false) {
|
||||
$guid->addAttribute('isPermaLink', 'false');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue