Skip to content

Commit

Permalink
Access modifiers for the methods
Browse files Browse the repository at this point in the history
  • Loading branch information
madhuracj committed Oct 28, 2012
1 parent dd0e96b commit c14dad6
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions libraries/File.class.php
Expand Up @@ -81,7 +81,7 @@ class PMA_File
*
* @access public
*/
function __construct($name = false)
public function __construct($name = false)
{
if ($name) {
$this->setName($name);
Expand All @@ -94,7 +94,7 @@ function __construct($name = false)
* @see PMA_File::cleanUp()
* @access public
*/
function __destruct()
public function __destruct()
{
$this->cleanUp();
}
Expand All @@ -105,7 +105,7 @@ function __destruct()
* @access public
* @return boolean success
*/
function cleanUp()
public function cleanUp()
{
if ($this->isTemp()) {
return $this->delete();
Expand All @@ -120,7 +120,7 @@ function cleanUp()
* @access public
* @return boolean success
*/
function delete()
public function delete()
{
return unlink($this->getName());
}
Expand All @@ -134,7 +134,7 @@ function delete()
* @return boolean PMA_File::$_is_temp
* @access public
*/
function isTemp($is_temp = null)
public function isTemp($is_temp = null)
{
if (null !== $is_temp) {
$this->_is_temp = (bool) $is_temp;
Expand All @@ -151,7 +151,7 @@ function isTemp($is_temp = null)
* @return void
* @access public
*/
function setName($name)
public function setName($name)
{
$this->_name = trim($name);
}
Expand All @@ -168,7 +168,7 @@ function setName($name)
*
* @access public
*/
function getContent($as_binary = true, $offset = 0, $length = null)
public function getContent($as_binary = true, $offset = 0, $length = null)
{
if (null === $this->_content) {
if ($this->isUploaded() && ! $this->checkUploadedFile()) {
Expand Down Expand Up @@ -206,7 +206,7 @@ function getContent($as_binary = true, $offset = 0, $length = null)
*
* @return bool
*/
function isUploaded()
public function isUploaded()
{
return is_uploaded_file($this->getName());
}
Expand All @@ -217,7 +217,7 @@ function isUploaded()
* @access public
* @return string PMA_File::$_name
*/
function getName()
public function getName()
{
return $this->_name;
}
Expand All @@ -230,7 +230,7 @@ function getName()
* @return boolean success
* @access public
*/
function setUploadedFile($name)
public function setUploadedFile($name)
{
$this->setName($name);

Expand All @@ -252,7 +252,7 @@ function setUploadedFile($name)
* @return boolean success
* @access public
*/
function setUploadedFromTblChangeRequest($key, $rownumber)
public function setUploadedFromTblChangeRequest($key, $rownumber)
{
if (! isset($_FILES['fields_upload'])
|| empty($_FILES['fields_upload']['name']['multi_edit'][$rownumber][$key])
Expand Down Expand Up @@ -327,7 +327,7 @@ function setUploadedFromTblChangeRequest($key, $rownumber)
* @access public
* @static
*/
function fetchUploadedFromTblChangeRequestMultiple($file, $rownumber, $key)
public function fetchUploadedFromTblChangeRequestMultiple($file, $rownumber, $key)
{
$new_file = array(
'name' => $file['name']['multi_edit'][$rownumber][$key],
Expand All @@ -349,7 +349,7 @@ function fetchUploadedFromTblChangeRequestMultiple($file, $rownumber, $key)
* @return boolean success
* @access public
*/
function setSelectedFromTblChangeRequest($key, $rownumber = null)
public function setSelectedFromTblChangeRequest($key, $rownumber = null)
{
if (! empty($_REQUEST['fields_uploadlocal']['multi_edit'][$rownumber][$key])
&& is_string($_REQUEST['fields_uploadlocal']['multi_edit'][$rownumber][$key])
Expand All @@ -369,7 +369,7 @@ function setSelectedFromTblChangeRequest($key, $rownumber = null)
* @access public
* @return string error message
*/
function getError()
public function getError()
{
return $this->_error_message;
}
Expand All @@ -380,7 +380,7 @@ function getError()
* @access public
* @return boolean whether an error occured or not
*/
function isError()
public function isError()
{
return ! empty($this->_error_message);
}
Expand All @@ -395,7 +395,7 @@ function isError()
* @return boolean success
* @access public
*/
function checkTblChangeForm($key, $rownumber)
public function checkTblChangeForm($key, $rownumber)
{
if ($this->setUploadedFromTblChangeRequest($key, $rownumber)) {
// well done ...
Expand All @@ -419,7 +419,7 @@ function checkTblChangeForm($key, $rownumber)
* @return boolean success
* @access public
*/
function setLocalSelectedFile($name)
public function setLocalSelectedFile($name)
{
if (empty($GLOBALS['cfg']['UploadDir'])) {
return false;
Expand All @@ -443,7 +443,7 @@ function setLocalSelectedFile($name)
* @access public
* @return boolean whether the file is readable or not
*/
function isReadable()
public function isReadable()
{
// suppress warnings from being displayed, but not from being logged
// any file access outside of open_basedir will issue a warning
Expand All @@ -462,7 +462,7 @@ function isReadable()
* @access public
* @return boolean whether uploaded fiel is fine or not
*/
function checkUploadedFile()
public function checkUploadedFile()
{
if ($this->isReadable()) {
return true;
Expand Down Expand Up @@ -513,7 +513,7 @@ function checkUploadedFile()
* @access protected
* @return string MIME type of compression, none for none
*/
function _detectCompression()
protected function _detectCompression()
{
// suppress warnings from being displayed, but not from being logged
// f.e. any file access outside of open_basedir will issue a warning
Expand Down Expand Up @@ -562,7 +562,7 @@ function _detectCompression()
*
* @return void
*/
function setDecompressContent($decompress)
public function setDecompressContent($decompress)
{
$this->_decompress = (bool) $decompress;
}
Expand All @@ -572,7 +572,7 @@ function setDecompressContent($decompress)
*
* @return object file handle
*/
function getHandle()
public function getHandle()
{
if (null === $this->_handle) {
$this->open();
Expand All @@ -587,7 +587,7 @@ function getHandle()
*
* @return void
*/
function setHandle($handle)
public function setHandle($handle)
{
$this->_handle = $handle;
}
Expand All @@ -598,7 +598,7 @@ function setHandle($handle)
*
* @return void
*/
function errorUnsupported()
public function errorUnsupported()
{
$this->_error_message = sprintf(
__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.'),
Expand All @@ -611,7 +611,7 @@ function errorUnsupported()
*
* @return bool
*/
function open()
public function open()
{
if (! $this->_decompress) {
$this->_handle = @fopen($this->getName(), 'r');
Expand Down Expand Up @@ -669,7 +669,7 @@ function open()
*
* @return string character set of the file
*/
function getCharset()
public function getCharset()
{
return $this->_charset;
}
Expand All @@ -681,7 +681,7 @@ function getCharset()
*
* @return void
*/
function setCharset($charset)
public function setCharset($charset)
{
$this->_charset = $charset;
}
Expand All @@ -692,7 +692,7 @@ function setCharset($charset)
* @return string MIME type of compression, none for none
* @access public
*/
function getCompression()
public function getCompression()
{
if (null === $this->_compression) {
return $this->_detectCompression();
Expand All @@ -709,7 +709,7 @@ function getCompression()
* @return boolean
* @todo this function is unused
*/
function advanceFilePointer($length)
public function advanceFilePointer($length)
{
while ($length > 0) {
$this->getNextChunk($length);
Expand All @@ -726,7 +726,7 @@ function advanceFilePointer($length)
* @return bool|string
* @todo this function is unused
*/
function getNextChunk($max_size = null)
public function getNextChunk($max_size = null)
{
if (null !== $max_size) {
$size = min($max_size, $this->getChunkSize());
Expand Down Expand Up @@ -808,7 +808,7 @@ function getNextChunk($max_size = null)
*
* @return integer the offset
*/
function getOffset()
public function getOffset()
{
return $this->_offset;
}
Expand All @@ -818,7 +818,7 @@ function getOffset()
*
* @return integer the chunk size
*/
function getChunkSize()
public function getChunkSize()
{
return $this->_chunk_size;
}
Expand All @@ -830,7 +830,7 @@ function getChunkSize()
*
* @return void
*/
function setChunkSize($chunk_size)
public function setChunkSize($chunk_size)
{
$this->_chunk_size = (int) $chunk_size;
}
Expand All @@ -840,7 +840,7 @@ function setChunkSize($chunk_size)
*
* @return integer the length of the file content
*/
function getContentLength()
public function getContentLength()
{
return strlen($this->_content);
}
Expand All @@ -850,7 +850,7 @@ function getContentLength()
*
* @return boolean whether the end of the file has been reached
*/
function eof()
public function eof()
{
if ($this->getHandle()) {
return feof($this->getHandle());
Expand Down

0 comments on commit c14dad6

Please sign in to comment.