phpOMS/System/File/StorageAbstract.php

89 lines
1.7 KiB
PHP

<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @category TBD
* @package TBD
* @author OMS Development Team <dev@oms.com>
* @author Dennis Eichhorn <d.eichhorn@oms.com>
* @copyright 2013 Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://orange-management.com
*/
namespace phpOMS\System\File;
/**
* Filesystem class.
*
* Performing operations on the file system
*
* @category Framework
* @package phpOMS\System\File
* @author OMS Development Team <dev@oms.com>
* @author Dennis Eichhorn <d.eichhorn@oms.com>
* @license OMS License 1.0
* @link http://orange-management.com
* @since 1.0.0
*/
abstract class StorageAbstract implements DirectoryInterface, FileInterface
{
/**
* Singleton instance.
*
* @var StorageAbstract
* @since 1.0.0
*/
protected static $instance = null;
/**
* Storage type.
*
* @var int
* @since 1.0.0
*/
protected $type = 0;
/**
* Constructor.
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
private function __construct()
{
}
/**
* Get instance.
*
* @return mixed Storage instance.
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public static function getInstance() : StorageAbstract
{
if(!isset(static::$instance)) {
static::$instance = new static();
}
return static::$instance;
}
/**
* Get storage type.
*
* @return int Storage type.
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public function getType() : int
{
return $this->type;
}
}