[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/08: Package Repository : add setContent
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 01/08: Package Repository : add setContent |
Date: |
Sat, 1 Jul 2023 11:09:07 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit fa7d4048f62f7ee2a606f830903c80dd22cf67d7
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Jun 9 22:04:33 2023 +0200
Package Repository : add setContent
---
include/class/package_repository.class.php | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/include/class/package_repository.class.php
b/include/class/package_repository.class.php
index 093ad079f..ba2becce8 100644
--- a/include/class/package_repository.class.php
+++ b/include/class/package_repository.class.php
@@ -57,7 +57,18 @@ class Package_Repository
}
/**
- * check that NOALYSS_HOME exists and is writable
+ * @brief set content
+ * @param $content xml file to be parsed
+ * @return Package_Repository
+ */
+ public function setContent($content)
+ {
+ $this->content=simplexml_load_string($content);
+ if ( $this->content==false ) throw new Exception ("XML INVALIDE
[$content]",EXC_INVALID);
+ return $this;
+ }
+ /**
+ * @brief check that NOALYSS_HOME exists and is writable
*/
function can_download()
{
- [Noalyss-commit] [noalyss] branch master updated (4925941c8 -> 3a7f97cf0), dwm, 2023/07/01
- [Noalyss-commit] [noalyss] 02/08: Ergonomy : add placeholder for VAT, dwm, 2023/07/01
- [Noalyss-commit] [noalyss] 04/08: Task #0002219: Compatibilité PHP 8.2 , 8.1 , 8.0, dwm, 2023/07/01
- [Noalyss-commit] [noalyss] 01/08: Package Repository : add setContent,
dwm <=
- [Noalyss-commit] [noalyss] 06/08: Change default background color in PDF + PHP8.1 compatibility, dwm, 2023/07/01
- [Noalyss-commit] [noalyss] 08/08: Cosmetic Fix bug : dossier name disappear, dwm, 2023/07/01
- [Noalyss-commit] [noalyss] 03/08: Package_Repository : add a mechanism of cache, dwm, 2023/07/01
- [Noalyss-commit] [noalyss] 07/08: Typo, dwm, 2023/07/01
- [Noalyss-commit] [noalyss] 05/08: Improve doc & test, dwm, 2023/07/01