mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 19:46:21 +05:30
Update composer + sitemap bugs fixes
This commit is contained in:
parent
2efa6f32f3
commit
7036f125c4
36 changed files with 3039 additions and 2243 deletions
|
|
@ -4,10 +4,10 @@
|
|||
"optimize-autoloader": true
|
||||
},
|
||||
"require": {
|
||||
"michelf/php-markdown": "~1.4",
|
||||
"suin/php-rss-writer": "~1",
|
||||
"kanti/hub-updater": "~0.3",
|
||||
"ircmaxell/password-compat": "^1.0"
|
||||
"ircmaxell/password-compat": "^1.0",
|
||||
"michelf/php-markdown": "^1.5"
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
|
|
|
|||
61
composer.lock
generated
61
composer.lock
generated
|
|
@ -4,7 +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": "68eb4fad3ec95821f7b883c60043ed6e",
|
||||
"hash": "7596d174acdf281f566feb7cbc72469d",
|
||||
"content-hash": "6dabcc2db078cb3f7d2e8af75949f4ce",
|
||||
"packages": [
|
||||
{
|
||||
"name": "ircmaxell/password-compat",
|
||||
|
|
@ -50,25 +51,28 @@
|
|||
},
|
||||
{
|
||||
"name": "kanti/hub-updater",
|
||||
"version": "v0.3.1",
|
||||
"version": "v0.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Kanti/hub-updater.git",
|
||||
"reference": "105bf291983b1323c5916092cc4e170bf987b00c"
|
||||
"reference": "81dae71f2b3ccd0e3425579ac932a8c6b7b58c5d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Kanti/hub-updater/zipball/105bf291983b1323c5916092cc4e170bf987b00c",
|
||||
"reference": "105bf291983b1323c5916092cc4e170bf987b00c",
|
||||
"url": "https://api.github.com/repos/Kanti/hub-updater/zipball/81dae71f2b3ccd0e3425579ac932a8c6b7b58c5d",
|
||||
"reference": "81dae71f2b3ccd0e3425579ac932a8c6b7b58c5d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.6@dev"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Kanti\\": ""
|
||||
"Kanti\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
|
@ -84,20 +88,20 @@
|
|||
}
|
||||
],
|
||||
"description": "Simple Github Updater for Web Projects",
|
||||
"time": "2014-12-27 13:59:09"
|
||||
"time": "2015-02-03 09:53:58"
|
||||
},
|
||||
{
|
||||
"name": "michelf/php-markdown",
|
||||
"version": "1.4.1",
|
||||
"version": "1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/michelf/php-markdown.git",
|
||||
"reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6"
|
||||
"reference": "e1aabe18173231ebcefc90e615565742fc1c7fd9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/de9a19c7bf352d41cc99ed86c3c0ef17e87394b6",
|
||||
"reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6",
|
||||
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/e1aabe18173231ebcefc90e615565742fc1c7fd9",
|
||||
"reference": "e1aabe18173231ebcefc90e615565742fc1c7fd9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -119,36 +123,36 @@
|
|||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michel Fortin",
|
||||
"email": "michel.fortin@michelf.ca",
|
||||
"homepage": "http://michelf.ca/",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "John Gruber",
|
||||
"homepage": "http://daringfireball.net/"
|
||||
},
|
||||
{
|
||||
"name": "Michel Fortin",
|
||||
"email": "michel.fortin@michelf.ca",
|
||||
"homepage": "https://michelf.ca/",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "PHP Markdown",
|
||||
"homepage": "http://michelf.ca/projects/php-markdown/",
|
||||
"homepage": "https://michelf.ca/projects/php-markdown/",
|
||||
"keywords": [
|
||||
"markdown"
|
||||
],
|
||||
"time": "2014-05-05 02:43:50"
|
||||
"time": "2015-03-01 12:03:08"
|
||||
},
|
||||
{
|
||||
"name": "suin/php-rss-writer",
|
||||
"version": "1.3",
|
||||
"version": "1.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/suin/php-rss-writer.git",
|
||||
"reference": "82812ff988bb470f746d24e153cdc138e8838ff3"
|
||||
"reference": "96ff59575442dbe23e15fe7ff56d0bf27486cff9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/suin/php-rss-writer/zipball/82812ff988bb470f746d24e153cdc138e8838ff3",
|
||||
"reference": "82812ff988bb470f746d24e153cdc138e8838ff3",
|
||||
"url": "https://api.github.com/repos/suin/php-rss-writer/zipball/96ff59575442dbe23e15fe7ff56d0bf27486cff9",
|
||||
"reference": "96ff59575442dbe23e15fe7ff56d0bf27486cff9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -157,7 +161,7 @@
|
|||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Suin\\RSSWriter": "Source"
|
||||
"Suin\\RSSWriter": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
|
@ -166,10 +170,8 @@
|
|||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "suin",
|
||||
"email": "suinyeze@gmail.com",
|
||||
"homepage": "https://www.facebook.com/suinyeze",
|
||||
"role": "Developer, Renaming Specialist"
|
||||
"name": "Hidehito Nozawa aka Suin",
|
||||
"email": "suinyeze@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Yet another simple RSS writer library for PHP 5.3 or later.",
|
||||
|
|
@ -177,10 +179,11 @@
|
|||
"keywords": [
|
||||
"feed",
|
||||
"generator",
|
||||
"php",
|
||||
"rss",
|
||||
"writer"
|
||||
],
|
||||
"time": "2014-03-12 06:05:28"
|
||||
"time": "2015-08-21 06:24:39"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
|
|
|
|||
|
|
@ -1835,7 +1835,7 @@ function sitemap_post_path()
|
|||
|
||||
// Author string
|
||||
$str = explode('/', $replaced);
|
||||
$author = $str[count($str) - 3];
|
||||
$author = $str[count($str) - 5];
|
||||
|
||||
$post->authorUrl = site_url() . 'author/' . $author;
|
||||
|
||||
|
|
@ -2480,7 +2480,7 @@ function remove_html_comments($content)
|
|||
// Google recaptcha
|
||||
function isCaptcha($reCaptchaResponse)
|
||||
{
|
||||
if (config('google.reCaptcha') == 'false') {
|
||||
if (config('google.reCaptcha') != 'true') {
|
||||
return true;
|
||||
}
|
||||
$url = "https://www.google.com/recaptcha/api/siteverify";
|
||||
|
|
|
|||
8
system/vendor/composer/ClassLoader.php
vendored
8
system/vendor/composer/ClassLoader.php
vendored
|
|
@ -351,7 +351,7 @@ class ClassLoader
|
|||
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
|
||||
if (0 === strpos($class, $prefix)) {
|
||||
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
|
||||
if (is_file($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
|
@ -361,7 +361,7 @@ class ClassLoader
|
|||
|
||||
// PSR-4 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr4 as $dir) {
|
||||
if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
|
@ -380,7 +380,7 @@ class ClassLoader
|
|||
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
||||
if (0 === strpos($class, $prefix)) {
|
||||
foreach ($dirs as $dir) {
|
||||
if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
|
@ -390,7 +390,7 @@ class ClassLoader
|
|||
|
||||
// PSR-0 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr0 as $dir) {
|
||||
if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
21
system/vendor/composer/LICENSE
vendored
Normal file
21
system/vendor/composer/LICENSE
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
Copyright (c) 2015 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
13
system/vendor/composer/autoload_classmap.php
vendored
13
system/vendor/composer/autoload_classmap.php
vendored
|
|
@ -6,4 +6,17 @@ $vendorDir = dirname(dirname(__FILE__));
|
|||
$baseDir = dirname(dirname($vendorDir));
|
||||
|
||||
return array(
|
||||
'Kanti\\CacheOneFile' => $vendorDir . '/kanti/hub-updater/src/CacheOneFile.php',
|
||||
'Kanti\\HelperClass' => $vendorDir . '/kanti/hub-updater/src/HelperClass.php',
|
||||
'Kanti\\HubUpdater' => $vendorDir . '/kanti/hub-updater/src/HubUpdater.php',
|
||||
'Michelf\\Markdown' => $vendorDir . '/michelf/php-markdown/Michelf/Markdown.php',
|
||||
'Michelf\\MarkdownExtra' => $vendorDir . '/michelf/php-markdown/Michelf/MarkdownExtra.php',
|
||||
'Michelf\\MarkdownInterface' => $vendorDir . '/michelf/php-markdown/Michelf/MarkdownInterface.php',
|
||||
'Suin\\RSSWriter\\Channel' => $vendorDir . '/suin/php-rss-writer/src/Suin/RSSWriter/Channel.php',
|
||||
'Suin\\RSSWriter\\ChannelInterface' => $vendorDir . '/suin/php-rss-writer/src/Suin/RSSWriter/ChannelInterface.php',
|
||||
'Suin\\RSSWriter\\Feed' => $vendorDir . '/suin/php-rss-writer/src/Suin/RSSWriter/Feed.php',
|
||||
'Suin\\RSSWriter\\FeedInterface' => $vendorDir . '/suin/php-rss-writer/src/Suin/RSSWriter/FeedInterface.php',
|
||||
'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',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ $vendorDir = dirname(dirname(__FILE__));
|
|||
$baseDir = dirname(dirname($vendorDir));
|
||||
|
||||
return array(
|
||||
'Suin\\RSSWriter' => array($vendorDir . '/suin/php-rss-writer/Source'),
|
||||
'Suin\\RSSWriter' => array($vendorDir . '/suin/php-rss-writer/src'),
|
||||
'Michelf' => array($vendorDir . '/michelf/php-markdown'),
|
||||
);
|
||||
|
|
|
|||
2
system/vendor/composer/autoload_psr4.php
vendored
2
system/vendor/composer/autoload_psr4.php
vendored
|
|
@ -6,5 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
|
|||
$baseDir = dirname(dirname($vendorDir));
|
||||
|
||||
return array(
|
||||
'Kanti\\' => array($vendorDir . '/kanti/hub-updater'),
|
||||
'Kanti\\' => array($vendorDir . '/kanti/hub-updater/src'),
|
||||
);
|
||||
|
|
|
|||
282
system/vendor/composer/installed.json
vendored
282
system/vendor/composer/installed.json
vendored
|
|
@ -1,144 +1,4 @@
|
|||
[
|
||||
{
|
||||
"name": "suin/php-rss-writer",
|
||||
"version": "1.3",
|
||||
"version_normalized": "1.3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/suin/php-rss-writer.git",
|
||||
"reference": "82812ff988bb470f746d24e153cdc138e8838ff3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/suin/php-rss-writer/zipball/82812ff988bb470f746d24e153cdc138e8838ff3",
|
||||
"reference": "82812ff988bb470f746d24e153cdc138e8838ff3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"time": "2014-03-12 06:05:28",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Suin\\RSSWriter": "Source"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "suin",
|
||||
"email": "suinyeze@gmail.com",
|
||||
"homepage": "https://www.facebook.com/suinyeze",
|
||||
"role": "Developer, Renaming Specialist"
|
||||
}
|
||||
],
|
||||
"description": "Yet another simple RSS writer library for PHP 5.3 or later.",
|
||||
"homepage": "https://github.com/suin/php-rss-writer",
|
||||
"keywords": [
|
||||
"feed",
|
||||
"generator",
|
||||
"rss",
|
||||
"writer"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "kanti/hub-updater",
|
||||
"version": "v0.3.1",
|
||||
"version_normalized": "0.3.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Kanti/hub-updater.git",
|
||||
"reference": "105bf291983b1323c5916092cc4e170bf987b00c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Kanti/hub-updater/zipball/105bf291983b1323c5916092cc4e170bf987b00c",
|
||||
"reference": "105bf291983b1323c5916092cc4e170bf987b00c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"time": "2014-12-27 13:59:09",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Kanti\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"GPL-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kanti",
|
||||
"email": "git@kanti.de",
|
||||
"homepage": "https://kanti.de",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Simple Github Updater for Web Projects"
|
||||
},
|
||||
{
|
||||
"name": "michelf/php-markdown",
|
||||
"version": "1.4.1",
|
||||
"version_normalized": "1.4.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/michelf/php-markdown.git",
|
||||
"reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/de9a19c7bf352d41cc99ed86c3c0ef17e87394b6",
|
||||
"reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"time": "2014-05-05 02:43:50",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-lib": "1.4.x-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "source",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Michelf": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michel Fortin",
|
||||
"email": "michel.fortin@michelf.ca",
|
||||
"homepage": "http://michelf.ca/",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "John Gruber",
|
||||
"homepage": "http://daringfireball.net/"
|
||||
}
|
||||
],
|
||||
"description": "PHP Markdown",
|
||||
"homepage": "http://michelf.ca/projects/php-markdown/",
|
||||
"keywords": [
|
||||
"markdown"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ircmaxell/password-compat",
|
||||
"version": "v1.0.4",
|
||||
|
|
@ -182,5 +42,147 @@
|
|||
"hashing",
|
||||
"password"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "michelf/php-markdown",
|
||||
"version": "1.5.0",
|
||||
"version_normalized": "1.5.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/michelf/php-markdown.git",
|
||||
"reference": "e1aabe18173231ebcefc90e615565742fc1c7fd9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/e1aabe18173231ebcefc90e615565742fc1c7fd9",
|
||||
"reference": "e1aabe18173231ebcefc90e615565742fc1c7fd9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"time": "2015-03-01 12:03:08",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-lib": "1.4.x-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Michelf": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "John Gruber",
|
||||
"homepage": "http://daringfireball.net/"
|
||||
},
|
||||
{
|
||||
"name": "Michel Fortin",
|
||||
"email": "michel.fortin@michelf.ca",
|
||||
"homepage": "https://michelf.ca/",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "PHP Markdown",
|
||||
"homepage": "https://michelf.ca/projects/php-markdown/",
|
||||
"keywords": [
|
||||
"markdown"
|
||||
]
|
||||
},
|
||||
{
|
||||
"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": "kanti/hub-updater",
|
||||
"version": "v0.4",
|
||||
"version_normalized": "0.4.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Kanti/hub-updater.git",
|
||||
"reference": "81dae71f2b3ccd0e3425579ac932a8c6b7b58c5d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Kanti/hub-updater/zipball/81dae71f2b3ccd0e3425579ac932a8c6b7b58c5d",
|
||||
"reference": "81dae71f2b3ccd0e3425579ac932a8c6b7b58c5d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.6@dev"
|
||||
},
|
||||
"time": "2015-02-03 09:53:58",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Kanti\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"GPL-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kanti",
|
||||
"email": "git@kanti.de",
|
||||
"homepage": "https://kanti.de",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Simple Github Updater for Web Projects"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
10
system/vendor/kanti/hub-updater/composer.json
vendored
10
system/vendor/kanti/hub-updater/composer.json
vendored
|
|
@ -19,9 +19,17 @@
|
|||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.6@dev"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Kanti\\": ""
|
||||
"Kanti\\": "src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Kanti\\Test\\": "tests"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
PHP Markdown Lib
|
||||
Copyright (c) 2004-2014 Michel Fortin
|
||||
<http://michelf.ca/>
|
||||
Copyright (c) 2004-2015 Michel Fortin
|
||||
<https://michelf.ca/>
|
||||
All rights reserved.
|
||||
|
||||
Based on Markdown
|
||||
|
|
|
|||
1754
system/vendor/michelf/php-markdown/Michelf/Markdown.php
vendored
1754
system/vendor/michelf/php-markdown/Michelf/Markdown.php
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -3,8 +3,8 @@
|
|||
# Markdown - A text-to-HTML conversion tool for web writers
|
||||
#
|
||||
# PHP Markdown
|
||||
# Copyright (c) 2004-2014 Michel Fortin
|
||||
# <http://michelf.com/projects/php-markdown/>
|
||||
# Copyright (c) 2004-2015 Michel Fortin
|
||||
# <https://michelf.ca/projects/php-markdown/>
|
||||
#
|
||||
# Original Markdown
|
||||
# Copyright (c) 2004-2006 John Gruber
|
||||
|
|
@ -32,6 +32,3 @@ interface MarkdownInterface {
|
|||
public function transform($text);
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
40
system/vendor/michelf/php-markdown/Readme.md
vendored
40
system/vendor/michelf/php-markdown/Readme.md
vendored
|
|
@ -1,10 +1,10 @@
|
|||
PHP Markdown
|
||||
============
|
||||
|
||||
PHP Markdown Lib 1.4.1 - 4 May 2013
|
||||
PHP Markdown Lib 1.5.0 - 1 Mar 2015
|
||||
|
||||
by Michel Fortin
|
||||
<http://michelf.ca/>
|
||||
<https://michelf.ca/>
|
||||
|
||||
based on Markdown by John Gruber
|
||||
<http://daringfireball.net/>
|
||||
|
|
@ -26,9 +26,9 @@ markup to HTML. PHP Markdown is a port to PHP of the original Markdown
|
|||
program by John Gruber.
|
||||
|
||||
* [Full documentation of the Markdown syntax](<http://daringfireball.net/projects/markdown/>)
|
||||
- Daring Fireball (John Gruber)
|
||||
* [Markdown Extra syntax additions](<http://michelf.ca/projects/php-markdown/extra/>)
|
||||
- Michel Fortin
|
||||
— Daring Fireball (John Gruber)
|
||||
* [Markdown Extra syntax additions](<https://michelf.ca/projects/php-markdown/extra/>)
|
||||
— Michel Fortin
|
||||
|
||||
|
||||
Requirement
|
||||
|
|
@ -83,7 +83,7 @@ configuration variables:
|
|||
|
||||
To learn more, see the full list of [configuration variables].
|
||||
|
||||
[configuration variables]: http://michelf.ca/projects/php-markdown/configuration/
|
||||
[configuration variables]: https://michelf.ca/projects/php-markdown/configuration/
|
||||
|
||||
|
||||
### Usage without an autoloader
|
||||
|
|
@ -174,6 +174,28 @@ PHP Markdown, please visit [michelf.ca/donate] or send Bitcoin to
|
|||
Version History
|
||||
---------------
|
||||
|
||||
PHP Markdown Lib 1.5.0 (1 Mar 2015)
|
||||
|
||||
* Added the ability start ordered lists with a number different from 1 and
|
||||
and have that reflected in the HTML output. This can be enabled with
|
||||
the `enhanced_ordered_lists` configuration variable for the Markdown
|
||||
parser; it is enabled by default for Markdown Extra.
|
||||
Credits to Matt Gorle for providing the implementation.
|
||||
|
||||
* Added the ability to insert custom HTML attributes with simple values
|
||||
everywhere an extra attribute block is allowed (links, images, headers).
|
||||
The value must be unquoted, cannot contains spaces and is limited to
|
||||
alphanumeric ASCII characters.
|
||||
Credits to Peter Droogmans for providing the implementation.
|
||||
|
||||
* Added a `header_id_func` configuration variable which takes a function
|
||||
that can generate an `id` attribute value from the header text.
|
||||
Credits to Evert Pot for providing the implementation.
|
||||
|
||||
* Added a `url_filter_func` configuration variable which takes a function
|
||||
that can rewrite any link or image URL to something different.
|
||||
|
||||
|
||||
PHP Markdown Lib 1.4.1 (4 May 2014)
|
||||
|
||||
* The HTML block parser will now treat `<figure>` as a block-level element
|
||||
|
|
@ -229,7 +251,7 @@ PHP Markdown Extra 1.2.6:
|
|||
|
||||
* Plugin interface for WordPress and other systems is no longer present in
|
||||
the Lib package. The classic package is still available if you need it:
|
||||
<http://michelf.ca/projects/php-markdown/classic/>
|
||||
<https://michelf.ca/projects/php-markdown/classic/>
|
||||
|
||||
* Added `public` and `protected` protection attributes, plus a section about
|
||||
what is "public API" and what isn't in the Readme file.
|
||||
|
|
@ -267,8 +289,8 @@ Copyright and License
|
|||
---------------------
|
||||
|
||||
PHP Markdown Lib
|
||||
Copyright (c) 2004-2014 Michel Fortin
|
||||
<http://michelf.ca/>
|
||||
Copyright (c) 2004-2015 Michel Fortin
|
||||
<https://michelf.ca/>
|
||||
All rights reserved.
|
||||
|
||||
Based on Markdown
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
"name": "michelf/php-markdown",
|
||||
"type": "library",
|
||||
"description": "PHP Markdown",
|
||||
"homepage": "http://michelf.ca/projects/php-markdown/",
|
||||
"homepage": "https://michelf.ca/projects/php-markdown/",
|
||||
"keywords": ["markdown"],
|
||||
"license": "BSD-3-Clause",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michel Fortin",
|
||||
"email": "michel.fortin@michelf.ca",
|
||||
"homepage": "http://michelf.ca/",
|
||||
"homepage": "https://michelf.ca/",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
3
system/vendor/suin/php-rss-writer/.gitignore
vendored
Normal file
3
system/vendor/suin/php-rss-writer/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.idea/
|
||||
.phpmake
|
||||
.DS_Store
|
||||
16
system/vendor/suin/php-rss-writer/.travis.yml
vendored
16
system/vendor/suin/php-rss-writer/.travis.yml
vendored
|
|
@ -1,11 +1,19 @@
|
|||
sudo: false
|
||||
language: php
|
||||
php:
|
||||
- 5.3
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- hhvm
|
||||
|
||||
before_script:
|
||||
- cd Tests
|
||||
- wget http://getcomposer.org/composer.phar
|
||||
- php composer.phar install
|
||||
- cd tests
|
||||
- composer install -n
|
||||
|
||||
script: ./phpunit --coverage-text --configuration phpunit.xml.dist
|
||||
script: phpunit --coverage-text --configuration phpunit.xml.dist
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- tests/vendor
|
||||
- $HOME/.composer/cache
|
||||
26
system/vendor/suin/php-rss-writer/README.md
vendored
26
system/vendor/suin/php-rss-writer/README.md
vendored
|
|
@ -61,9 +61,14 @@ Output:
|
|||
|
||||
## Installation
|
||||
|
||||
You can install via Composer.
|
||||
### Easy installation
|
||||
You can install directly via [Composer](https://getcomposer.org/):
|
||||
```bash
|
||||
$ composer require suin/php-rss-writer
|
||||
```
|
||||
|
||||
At first create `composer.json` file:
|
||||
### Manual installation
|
||||
Add the following code to your `composer.json` file:
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
@ -73,23 +78,22 @@ At first create `composer.json` file:
|
|||
}
|
||||
```
|
||||
|
||||
Run composer to install.
|
||||
|
||||
```
|
||||
...and run composer to install it:
|
||||
```bash
|
||||
$ composer install
|
||||
```
|
||||
|
||||
Finally, include `vendor/autoload.php` in your product.
|
||||
|
||||
```
|
||||
Finally, include `vendor/autoload.php` in your product:
|
||||
```php
|
||||
<?php
|
||||
require_once 'vendor/autoload.php';
|
||||
```
|
||||
|
||||
## How to Use
|
||||
## How to use
|
||||
|
||||
`example.php` is an example usage of RSSWriter.
|
||||
The [`examples`](examples) directory contains usage examples for RSSWriter.
|
||||
|
||||
If you want to know APIs, please see `FeedInterface`, `ChannelInterface` and `ItemInterface`.
|
||||
If you want to know APIs, please see [`FeedInterface`](src/Suin/RSSWriter/FeedInterface.php), [`ChannelInterface`](src/Suin/RSSWriter/ChannelInterface.php) and [`ItemInterface`](src/Suin/RSSWriter/ItemInterface.php).
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
|||
3
system/vendor/suin/php-rss-writer/Tests/.gitignore
vendored
Normal file
3
system/vendor/suin/php-rss-writer/Tests/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Coverage/
|
||||
vendor/*
|
||||
/composer.lock
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
<?php
|
||||
|
||||
// For composer
|
||||
require_once 'Vendor/autoload.php';
|
||||
require_once 'vendor/autoload.php';
|
||||
|
||||
// Load test target classes
|
||||
spl_autoload_register(function($c) { @include_once strtr($c, '\\_', '//').'.php'; });
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__DIR__).'/Source');
|
||||
spl_autoload_register(function ($c) {
|
||||
@include_once strtr($c, '\\_', '//') . '.php';
|
||||
});
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__DIR__) . '/src');
|
||||
|
|
@ -24,5 +24,4 @@ $ ./phpunit
|
|||
|
||||
## View Reports
|
||||
|
||||
|
||||
If you want to see code coverages, open Coverage/index.html.
|
||||
|
|
@ -94,11 +94,10 @@ class ChannelTest extends \XoopsUnit\TestCase
|
|||
*/
|
||||
public function testAsXML($expect, array $data)
|
||||
{
|
||||
$data = (object) $data;
|
||||
$data = (object)$data;
|
||||
$channel = new Channel();
|
||||
|
||||
foreach ( $data as $key => $value )
|
||||
{
|
||||
foreach ($data as $key => $value) {
|
||||
$this->reveal($channel)->attr($key, $value);
|
||||
}
|
||||
|
||||
|
|
@ -208,7 +207,6 @@ class ChannelTest extends \XoopsUnit\TestCase
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
public function testAppendTo_with_items()
|
||||
{
|
||||
$channel = new Channel();
|
||||
|
|
@ -219,7 +217,7 @@ class ChannelTest extends \XoopsUnit\TestCase
|
|||
|
||||
$item1 = $this->getMock($this->itemInterface);
|
||||
$item1->expects($this->once())->method('asXML')->will($this->returnValue($xml1));
|
||||
$item2= $this->getMock($this->itemInterface);
|
||||
$item2 = $this->getMock($this->itemInterface);
|
||||
$item2->expects($this->once())->method('asXML')->will($this->returnValue($xml2));
|
||||
$item3 = $this->getMock($this->itemInterface);
|
||||
$item3->expects($this->once())->method('asXML')->will($this->returnValue($xml3));
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
use \Mockery;
|
||||
use Mockery;
|
||||
|
||||
class FeedTest extends \XoopsUnit\TestCase
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
class ItemTest extends \XoopsUnit\TestCase
|
||||
use XoopsUnit\TestCase;
|
||||
|
||||
class ItemTest extends TestCase
|
||||
{
|
||||
private $channelInterface = '\Suin\RSSWriter\ChannelInterface';
|
||||
|
||||
|
|
@ -97,6 +99,14 @@ class ItemTest extends \XoopsUnit\TestCase
|
|||
$this->assertAttributeSame($enclosure, 'enclosure', $item);
|
||||
}
|
||||
|
||||
public function testAuthor()
|
||||
{
|
||||
$author = uniqid();
|
||||
$item = new Item();
|
||||
$this->assertSame($item, $item->author($author));
|
||||
$this->assertAttributeSame($author, 'author', $item);
|
||||
}
|
||||
|
||||
public function testAsXML()
|
||||
{
|
||||
$now = time();
|
||||
|
|
@ -116,17 +126,17 @@ class ItemTest extends \XoopsUnit\TestCase
|
|||
'enclosure' => array(
|
||||
'url' => 'http://link-to-audio-file.com/test.mp3',
|
||||
'length' => 4992,
|
||||
'type' => 'audio/mpeg')
|
||||
'type' => 'audio/mpeg'),
|
||||
'author' => 'Hidehito Nozawa aka Suin'
|
||||
);
|
||||
|
||||
$item = new Item();
|
||||
|
||||
foreach ( $data as $key => $value )
|
||||
{
|
||||
foreach ($data as $key => $value) {
|
||||
$this->reveal($item)->attr($key, $value);
|
||||
}
|
||||
|
||||
$expect ="
|
||||
$expect = "
|
||||
<item>
|
||||
<title>{$data['title']}</title>
|
||||
<link>{$data['url']}</link>
|
||||
|
|
@ -135,7 +145,8 @@ class ItemTest extends \XoopsUnit\TestCase
|
|||
<category domain=\"{$data['categories'][1][1]}\">{$data['categories'][1][0]}</category>
|
||||
<guid isPermaLink=\"true\">{$data['guid']}</guid>
|
||||
<pubDate>{$nowString}</pubDate>
|
||||
<enclosure url=\"{$data['enclosure']['url']}\" length=\"{$data['enclosure']['length']}\" type=\"{$data['enclosure']['type']}\"/>
|
||||
<enclosure url=\"{$data['enclosure']['url']}\" type=\"{$data['enclosure']['type']}\" length=\"{$data['enclosure']['length']}\"/>
|
||||
<author>{$data['author']}</author>
|
||||
</item>
|
||||
";
|
||||
$this->assertXmlStringEqualsXmlString($expect, $item->asXML()->asXML());
|
||||
|
|
@ -143,9 +154,6 @@ class ItemTest extends \XoopsUnit\TestCase
|
|||
|
||||
public function testAsXML_test_Japanese()
|
||||
{
|
||||
$now = time();
|
||||
$nowString = date(DATE_RSS, $now);
|
||||
|
||||
$data = array(
|
||||
'title' => "Venice Film Festival",
|
||||
'url' => 'http://nytimes.com/2004/12/07FEST.html',
|
||||
|
|
@ -154,8 +162,7 @@ class ItemTest extends \XoopsUnit\TestCase
|
|||
|
||||
$item = new Item();
|
||||
|
||||
foreach ( $data as $key => $value )
|
||||
{
|
||||
foreach ($data as $key => $value) {
|
||||
$this->reveal($item)->attr($key, $value);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
"config": {
|
||||
"bin-dir": ".",
|
||||
"vendor-dir": "Vendor"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.2",
|
||||
"EHER/PHPUnit": ">=1.6",
|
||||
|
|
|
|||
|
|
@ -20,23 +20,21 @@
|
|||
highlight="false"
|
||||
lowUpperBound="35"
|
||||
highLowerBound="70" />
|
||||
<!-- <log type="coverage-text" target="php://stdout" lowUpperBound="35" highLowerBound="70" /> -->
|
||||
</logging>
|
||||
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">../Source</directory>
|
||||
<!-- <file>/path/to/file</file> -->
|
||||
<directory suffix=".php">../src</directory>
|
||||
<exclude>
|
||||
<file>../Public/index.php</file>
|
||||
<directory suffix="Interface.php">../Source</directory>
|
||||
<directory suffix="Interface.php">../src</directory>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
<blacklist>
|
||||
<directory suffix=".php" group="PHPUNIT">../Vendor</directory>
|
||||
<directory suffix=".php" group="PHPUNIT">../vendor</directory>
|
||||
</blacklist>
|
||||
</filter>
|
||||
<listeners>
|
||||
<listener class="\Mockery\Adapter\Phpunit\TestListener" file="Vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php" />
|
||||
<listener class="\Mockery\Adapter\Phpunit\TestListener" file="vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php" />
|
||||
</listeners>
|
||||
</phpunit>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "suin/php-rss-writer",
|
||||
"type": "library",
|
||||
"description": "Yet another simple RSS writer library for PHP 5.3 or later.",
|
||||
"keywords": ["rss", "generator", "writer", "feed"],
|
||||
"keywords": ["rss", "generator", "writer", "feed", "php"],
|
||||
"homepage": "https://github.com/suin/php-rss-writer",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
|
|
@ -15,6 +15,6 @@
|
|||
"php": ">=5.3.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": { "Suin\\RSSWriter": "Source" }
|
||||
"psr-0": { "Suin\\RSSWriter": "src" }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
37
system/vendor/suin/php-rss-writer/examples/simple-feed.php
vendored
Normal file
37
system/vendor/suin/php-rss-writer/examples/simple-feed.php
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
// Load test target classes
|
||||
spl_autoload_register(function ($c) {
|
||||
@include_once strtr($c, '\\_', '//') . '.php';
|
||||
});
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__DIR__) . '/src');
|
||||
|
||||
use Suin\RSSWriter\Channel;
|
||||
use Suin\RSSWriter\Feed;
|
||||
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();
|
||||
193
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/Channel.php
vendored
Normal file
193
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/Channel.php
vendored
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
/**
|
||||
* Class Channel
|
||||
* @package Suin\RSSWriter
|
||||
*/
|
||||
class Channel implements 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 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 ItemInterface $item
|
||||
* @return $this
|
||||
*/
|
||||
public function addItem(ItemInterface $item)
|
||||
{
|
||||
$this->items[] = $item;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append to feed
|
||||
* @param FeedInterface $feed
|
||||
* @return $this
|
||||
*/
|
||||
public function appendTo(FeedInterface $feed)
|
||||
{
|
||||
$feed->addChannel($this);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return XML object
|
||||
* @return 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;
|
||||
}
|
||||
}
|
||||
92
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/ChannelInterface.php
vendored
Normal file
92
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/ChannelInterface.php
vendored
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
/**
|
||||
* Interface ChannelInterface
|
||||
* @package Suin\RSSWriter
|
||||
*/
|
||||
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 ItemInterface $item
|
||||
* @return $this
|
||||
*/
|
||||
public function addItem(ItemInterface $item);
|
||||
|
||||
/**
|
||||
* Append to feed
|
||||
* @param FeedInterface $feed
|
||||
* @return $this
|
||||
*/
|
||||
public function appendTo(FeedInterface $feed);
|
||||
|
||||
/**
|
||||
* Return XML object
|
||||
* @return SimpleXMLElement
|
||||
*/
|
||||
public function asXML();
|
||||
}
|
||||
55
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/Feed.php
vendored
Normal file
55
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/Feed.php
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
use DOMDocument;
|
||||
|
||||
/**
|
||||
* Class Feed
|
||||
* @package Suin\RSSWriter
|
||||
*/
|
||||
class Feed implements FeedInterface
|
||||
{
|
||||
/** @var ChannelInterface[] */
|
||||
protected $channels = array();
|
||||
|
||||
/**
|
||||
* Add channel
|
||||
* @param 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();
|
||||
}
|
||||
}
|
||||
29
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/FeedInterface.php
vendored
Normal file
29
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/FeedInterface.php
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
/**
|
||||
* Interface FeedInterface
|
||||
* @package Suin\RSSWriter
|
||||
*/
|
||||
interface FeedInterface
|
||||
{
|
||||
/**
|
||||
* Add channel
|
||||
* @param ChannelInterface $channel
|
||||
* @return $thisJ
|
||||
*/
|
||||
public function addChannel(ChannelInterface $channel);
|
||||
|
||||
/**
|
||||
* Render XML
|
||||
* @return string
|
||||
*/
|
||||
public function render();
|
||||
|
||||
/**
|
||||
* Render XML
|
||||
* @return string
|
||||
*/
|
||||
public function __toString();
|
||||
}
|
||||
136
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/Item.php
vendored
Normal file
136
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/Item.php
vendored
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
/**
|
||||
* Class Item
|
||||
* @package Suin\RSSWriter
|
||||
*/
|
||||
class Item implements 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;
|
||||
|
||||
/** @var string */
|
||||
protected $author;
|
||||
|
||||
public function title($title)
|
||||
{
|
||||
$this->title = $title;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function url($url)
|
||||
{
|
||||
$this->url = $url;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function description($description)
|
||||
{
|
||||
$this->description = $description;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function category($name, $domain = null)
|
||||
{
|
||||
$this->categories[] = array($name, $domain);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function guid($guid, $isPermalink = false)
|
||||
{
|
||||
$this->guid = $guid;
|
||||
$this->isPermalink = $isPermalink;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function pubDate($pubDate)
|
||||
{
|
||||
$this->pubDate = $pubDate;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function enclosure($url, $length = 0, $type = 'audio/mpeg')
|
||||
{
|
||||
$this->enclosure = array('url' => $url, 'length' => $length, 'type' => $type);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function author($author)
|
||||
{
|
||||
$this->author = $author;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function appendTo(ChannelInterface $channel)
|
||||
{
|
||||
$channel->addItem($this);
|
||||
return $this;
|
||||
}
|
||||
|
||||
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']);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($this->author)) {
|
||||
$xml->addChild('author', $this->author);
|
||||
}
|
||||
|
||||
return $xml;
|
||||
}
|
||||
}
|
||||
83
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/ItemInterface.php
vendored
Normal file
83
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/ItemInterface.php
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
/**
|
||||
* Interface ItemInterface
|
||||
* @package Suin\RSSWriter
|
||||
*/
|
||||
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 string $url Url to media file
|
||||
* @param int $length Length in bytes of the media file
|
||||
* @param string $type Media type, default is audio/mpeg
|
||||
* @return $this
|
||||
*/
|
||||
public function enclosure($url, $length = 0, $type = 'audio/mpeg');
|
||||
|
||||
/**
|
||||
* Set the author
|
||||
* @param string $author Email of item author
|
||||
* @return $this
|
||||
*/
|
||||
public function author($author);
|
||||
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
19
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/SimpleXMLElement.php
vendored
Normal file
19
system/vendor/suin/php-rss-writer/src/Suin/RSSWriter/SimpleXMLElement.php
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Suin\RSSWriter;
|
||||
|
||||
/**
|
||||
* Class SimpleXMLElement
|
||||
* @package 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue