Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Zend_Filter_File_LowerCase Class Reference
Inheritance diagram for Zend_Filter_File_LowerCase:
Zend_Filter_StringToLower Zend_Filter_Interface

Public Member Functions

 __construct ($options=null)
 
 filter ($value)
 
- Public Member Functions inherited from Zend_Filter_StringToLower
 __construct ($options=null)
 
 getEncoding ()
 
 setEncoding ($encoding=null)
 
 filter ($value)
 

Additional Inherited Members

- Protected Attributes inherited from Zend_Filter_StringToLower
 $_encoding = null
 

Detailed Description

Definition at line 33 of file LowerCase.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $options = null)

Adds options to the filter at initiation

Parameters
string$options

Definition at line 40 of file LowerCase.php.

41  {
42  if (!empty($options)) {
43  $this->setEncoding($options);
44  }
45  }
setEncoding($encoding=null)

Member Function Documentation

◆ filter()

filter (   $value)

Defined by Zend_Filter_Interface

Does a lowercase on the content of the given file

Parameters
string$valueFull path of file to change
Returns
string The given $value
Exceptions
Zend_Filter_Exception

Implements Zend_Filter_Interface.

Definition at line 56 of file LowerCase.php.

57  {
58  if (!file_exists($value)) {
59  #require_once 'Zend/Filter/Exception.php';
60  throw new Zend_Filter_Exception("File '$value' not found");
61  }
62 
63  if (!is_writable($value)) {
64  #require_once 'Zend/Filter/Exception.php';
65  throw new Zend_Filter_Exception("File '$value' is not writable");
66  }
67 
69  if (!$content) {
70  #require_once 'Zend/Filter/Exception.php';
71  throw new Zend_Filter_Exception("Problem while reading file '$value'");
72  }
73 
74  $content = parent::filter($content);
76 
77  if (!$result) {
78  #require_once 'Zend/Filter/Exception.php';
79  throw new Zend_Filter_Exception("Problem while writing file '$value'");
80  }
81 
82  return $value;
83  }
$value
Definition: gender.phtml:16
is_writable($path)
Definition: io.php:25

The documentation for this class was generated from the following file: