public function getDisk()
    {
        if ($this->disk_instance === null) {
            // Create disk class
            $class = "\\Torann\\MediaSort\\Disks\\" . ucfirst($this->config('disk'));

            // Verify disk
            if (class_exists($class) === false) {
                throw new InvalidClassException("Disk type \"{$class}\" not found.");
            }

            // Create disk instance
            $this->disk_instance = Container::getInstance()->makeWith($class, ['media' => $this]);
        }

        return $this->disk_instance;
    }
public function getDisk()
    {
        if ($this->disk_instance === null) {
            // Create disk class
            $class = "\\Torann\\MediaSort\\Disks\\" . ucfirst($this->config('disk'));

            // Verify disk
            if (class_exists($class) === false) {
                throw new InvalidClassException("Disk type \"{$class}\" not found.");
            }

            // Create disk instance
            $this->disk_instance = Container::getInstance()->makeWith($class, ['media' => $this]);
        }

        return $this->disk_instance;
    }
public function getDisk ( ) { if ( $ this -> disk_instance === null ) { // Create disk class $ class = "\\Torann\\MediaSort\\Disks\\" . ucfirst ( $ this -> config ( 'disk' ) ) ; // Verify disk if ( class_exists ( $ class ) === false ) { throw new InvalidClassException ( "Disk type \"{$class}\" not found." ) ; } // Create disk instance $ this -> disk_instance = Container :: getInstance ( ) -> makeWith ( $ class , [ 'media' => $ this ] ) ; } return $ this -> disk_instance ; }
Get disk instance.

@return \Torann\MediaSort\Disks\AbstractDisk
@throws \Torann\MediaSort\Exceptions\InvalidClassException
Get disk instance .