PHP Class Devise\Media\Helpers\Caption

Show file Open project: devisephp/cms

Public Methods

Method Description
__construct ( MediaPaths $MediaPaths, Framework $Framework ) : void Construct a new Caption Helper
exists ( string $imagePath ) : boolean Checks if a caption file exitst for the image passed
saveForImage ( string $imagePath, $text ) : string Saves the text file using the image path, and text passed
text ( string $imagePath ) : string Finds the caption text for an image

Method Details

__construct() public method

Construct a new Caption Helper
public __construct ( MediaPaths $MediaPaths, Framework $Framework ) : void
$MediaPaths Devise\Media\MediaPaths
$Framework Devise\Support\Framework
return void

exists() public method

Checks if a caption file exitst for the image passed
public exists ( string $imagePath ) : boolean
$imagePath string
return boolean

saveForImage() public method

Saves the text file using the image path, and text passed
public saveForImage ( string $imagePath, $text ) : string
$imagePath string
return string $text

text() public method

Finds the caption text for an image
public text ( string $imagePath ) : string
$imagePath string
return string