Skip to content

Commit a14cf76

Browse files
committed
Update 1.0.2
1 parent b14d4e6 commit a14cf76

36 files changed

Lines changed: 118 additions & 63 deletions

‎composer.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "floatphp/classes",
3-
"version" : "1.0.1",
3+
"version" : "1.0.2",
44
"type": "library",
55
"description": "FloatPHP Classes Components",
66
"keywords": ["floatphp","micro-framework","framework","PSR","ORM","jakiboy"],
@@ -20,7 +20,7 @@
2020
],
2121
"require": {
2222
"php": ">=7.4",
23-
"floatphp/interfaces": "^1.0.1"
23+
"floatphp/interfaces": "^1.0.2"
2424
},
2525
"autoload": {
2626
"psr-4" : {

‎src/Connection/Db.php‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : JIHAD SINNAOUR
44
* @package : FloatPHP
55
* @subpackage : Classes Connection Component
6-
* @version : 1.0.1
6+
* @version : 1.0.2
77
* @category : PHP framework
88
* @copyright : (c) 2017 - 2023 Jihad Sinnaour <mail@jihadsinnaour.com>
99
* @link : https://www.floatphp.com
@@ -270,7 +270,6 @@ private function connect($config = [])
270270
* @param string $query
271271
* @param array $params
272272
* @return void
273-
* @throws PDOException
274273
*/
275274
private function Init($query, $params = [])
276275
{

‎src/Filesystem/Archive.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : JIHAD SINNAOUR
44
* @package : FloatPHP
55
* @subpackage : Classes Filesystem Component
6-
* @version : 1.0.1
6+
* @version : 1.0.2
77
* @category : PHP framework
88
* @copyright : (c) 2017 - 2023 Jihad Sinnaour <mail@jihadsinnaour.com>
99
* @link : https://www.floatphp.com

‎src/Filesystem/Arrayify.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : JIHAD SINNAOUR
44
* @package : FloatPHP
55
* @subpackage : Classes Filesystem Component
6-
* @version : 1.0.1
6+
* @version : 1.0.2
77
* @category : PHP framework
88
* @copyright : (c) 2017 - 2023 Jihad Sinnaour <mail@jihadsinnaour.com>
99
* @link : https://www.floatphp.com

‎src/Filesystem/Converter.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : JIHAD SINNAOUR
44
* @package : FloatPHP
55
* @subpackage : Classes Filesystem Component
6-
* @version : 1.0.1
6+
* @version : 1.0.2
77
* @category : PHP framework
88
* @copyright : (c) 2017 - 2023 Jihad Sinnaour <mail@jihadsinnaour.com>
99
* @link : https://www.floatphp.com

‎src/Filesystem/Exception.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : JIHAD SINNAOUR
44
* @package : FloatPHP
55
* @subpackage : Classes Filesystem Component
6-
* @version : 1.0.1
6+
* @version : 1.0.2
77
* @category : PHP framework
88
* @copyright : (c) 2017 - 2023 Jihad Sinnaour <mail@jihadsinnaour.com>
99
* @link : https://www.floatphp.com

‎src/Filesystem/File.php‎

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : JIHAD SINNAOUR
44
* @package : FloatPHP
55
* @subpackage : Classes Filesystem Component
6-
* @version : 1.0.1
6+
* @version : 1.0.2
77
* @category : PHP framework
88
* @copyright : (c) 2017 - 2023 Jihad Sinnaour <mail@jihadsinnaour.com>
99
* @link : https://www.floatphp.com
@@ -163,6 +163,7 @@ public static function getSize($path, $decimals = 2)
163163
* Get file permissions.
164164
*
165165
* @access public
166+
* @param string $path
166167
* @param bool $convert
167168
* @return mixed
168169
*/
@@ -172,6 +173,35 @@ public static function getPermissions($path, $convert = false)
172173
return ($convert) ? intval($permissions) : $permissions;
173174
}
174175

176+
/**
177+
* Get file lines.
178+
*
179+
* FILE_IGNORE_NEW_LINES: 2
180+
* FILE_SKIP_EMPTY_LINES: 4
181+
*
182+
* @access public
183+
* @param string $path
184+
* @param array $exclude
185+
* @param int $flags
186+
* @return array
187+
*/
188+
public static function getLines($path, $exclude = [], $flags = 2|4)
189+
{
190+
$lines = [];
191+
if ( ($lines = @file($path, $flags)) ) {
192+
if ( $exclude ) {
193+
foreach ($lines as $key => $value) {
194+
foreach ($exclude as $search) {
195+
if ( Stringify::contains($value, $search) ) {
196+
unset($lines[$key]);
197+
}
198+
}
199+
}
200+
}
201+
}
202+
return $lines;
203+
}
204+
175205
/**
176206
* Add string to file.
177207
*

‎src/Filesystem/Json.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : JIHAD SINNAOUR
44
* @package : FloatPHP
55
* @subpackage : Classes Filesystem Component
6-
* @version : 1.0.1
6+
* @version : 1.0.2
77
* @category : PHP framework
88
* @copyright : (c) 2017 - 2023 Jihad Sinnaour <mail@jihadsinnaour.com>
99
* @link : https://www.floatphp.com
@@ -58,9 +58,9 @@ public static function encode($value)
5858
/**
5959
* Format JSON.
6060
*
61-
* JSON_UNESCAPED_UNICODE : 256
62-
* JSON_PRETTY_PRINT : 128
6361
* JSON_UNESCAPED_SLASHES : 64
62+
* JSON_PRETTY_PRINT : 128
63+
* JSON_UNESCAPED_UNICODE : 256
6464
*
6565
* @access public
6666
* @param mixed $value

‎src/Filesystem/Logger.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : JIHAD SINNAOUR
44
* @package : FloatPHP
55
* @subpackage : Classes Filesystem Component
6-
* @version : 1.0.1
6+
* @version : 1.0.2
77
* @category : PHP framework
88
* @copyright : (c) 2017 - 2023 Jihad Sinnaour <mail@jihadsinnaour.com>
99
* @link : https://www.floatphp.com

‎src/Filesystem/Stringify.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author : JIHAD SINNAOUR
44
* @package : FloatPHP
55
* @subpackage : Classes Filesystem Component
6-
* @version : 1.0.1
6+
* @version : 1.0.2
77
* @category : PHP framework
88
* @copyright : (c) 2017 - 2023 Jihad Sinnaour <mail@jihadsinnaour.com>
99
* @link : https://www.floatphp.com

0 commit comments

Comments
 (0)