Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
Backup
Filesystem
Iterator
File.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Backup\Filesystem\Iterator
;
7
13
class
File
extends
\SplFileObject
14
{
20
protected
$_currentStatement
=
''
;
21
27
public
function
current
()
28
{
29
return
$this->_currentStatement
;
30
}
31
37
public
function
next
()
38
{
39
$this->_currentStatement =
''
;
40
while
(!$this->eof()) {
41
$line = $this->fgets();
42
if
(strlen(trim($line))) {
43
$this->_currentStatement .= $line;
44
if
($this->
_isLineLastInCommand
($line)) {
45
break
;
46
}
47
}
48
}
49
}
50
56
public
function
rewind
()
57
{
58
parent::rewind();
59
$this->
next
();
60
}
61
68
protected
function
_isComment
($line)
69
{
70
return
$line[0] ==
'#'
|| substr($line, 0, 2) ==
'--'
;
71
}
72
79
protected
function
_isLineLastInCommand
($line)
80
{
81
$cleanLine = trim($line);
82
$lineLength = strlen($cleanLine);
83
84
$returnResult =
false
;
85
if
($lineLength > 0) {
86
$lastSymbolIndex = $lineLength - 1;
87
if
($cleanLine[$lastSymbolIndex] ==
';'
) {
88
$returnResult =
true
;
89
}
90
}
91
92
return
$returnResult;
93
}
94
}
Magento\Framework\Backup\Filesystem\Iterator\File\next
next()
Definition:
File.php:37
Magento\Framework\Backup\Filesystem\Iterator\File
Definition:
File.php:13
Magento\Framework\Backup\Filesystem\Iterator\File\_isComment
_isComment($line)
Definition:
File.php:68
Magento\Framework\Backup\Filesystem\Iterator\File\_isLineLastInCommand
_isLineLastInCommand($line)
Definition:
File.php:79
Magento\Framework\Backup\Filesystem\Iterator\File\current
current()
Definition:
File.php:27
Magento\Framework\Backup\Filesystem\Iterator\File\rewind
rewind()
Definition:
File.php:56
Magento\Framework\Backup\Filesystem\Iterator\File\$_currentStatement
$_currentStatement
Definition:
File.php:20
Magento\Framework\Backup\Filesystem\Iterator
Definition:
File.php:6