namespace CoreFramework\Filesystem\Pointer\Input;
// Import framework stuff
+use CoreFramework\Bootstrap\FrameworkBootstrap;
use CoreFramework\FileSystem\BaseFileIo;
use CoreFramework\Filesystem\Pointer\InputPointer;
use CoreFramework\Generic\NullPointerException;
if ((is_null($fileName)) || (empty($fileName))) {
// No filename given
throw new FileIsEmptyException(NULL, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
- } elseif (!BaseFrameworkSystem::isReachableFilePath($fileName)) {
+ } elseif (!FrameworkBootstrap::isReachableFilePath($fileName)) {
// File cannot be accessed (due to open_basedir restriction)
throw new FileIoException($fileName, self::EXCEPTION_FILE_NOT_REACHABLE);
- } elseif ((!BaseFrameworkSystem::isReadableFile($fileName)) && (file_exists($fileName))) {
+ } elseif ((!FrameworkBootstrap::isReadableFile($fileName)) && (file_exists($fileName))) {
// File exists but cannot be read from
throw new FileReadProtectedException($fileName, self::EXCEPTION_FILE_CANNOT_BE_READ);
- } elseif ((!BaseFrameworkSystem::isReadableFile($fileName)) && (!file_exists($fileName))) {
+ } elseif ((!FrameworkBootstrap::isReadableFile($fileName)) && (!file_exists($fileName))) {
// File does not exist
throw new FileNotFoundException($fileName, self::EXCEPTION_FILE_NOT_FOUND);
}
// Try to open a handler
$filePointer = fopen($fileName, 'rb');
- if ((is_null($filePointer)) || ($filePointer === FALSE)) {
+ if ((is_null($filePointer)) || ($filePointer === false)) {
// Something bad happend
throw new FileIoException($fileName, self::EXCEPTION_FILE_POINTER_INVALID);
} // END - if
/**
* Checks wether the current entry is valid (not at the end of the file).
- * This method will return TRUE if an emptied (nulled) entry has been found.
+ * This method will return true if an emptied (nulled) entry has been found.
*
* @return $isValid Whether the next entry is valid
* @throws UnsupportedOperationException If this method is called