Added code documentation
This commit is contained in:
parent
9a2982de29
commit
4177219f67
@ -327,6 +327,16 @@ class Photo extends Module {
|
|||||||
|
|
||||||
private function createMedium($url, $filename, $width, $height) {
|
private function createMedium($url, $filename, $width, $height) {
|
||||||
|
|
||||||
|
# Function creates a smaller version of a photo when its size is bigger than a preset size
|
||||||
|
# Excepts the following:
|
||||||
|
# (string) $url = Path to the photo-file
|
||||||
|
# (string) $filename = Name of the photo-file
|
||||||
|
# (int) $width = Width of the photo
|
||||||
|
# (int) $height = Height of the photo
|
||||||
|
# Returns the following
|
||||||
|
# (boolean) true = Success
|
||||||
|
# (boolean) false = Failure
|
||||||
|
|
||||||
# Check dependencies
|
# Check dependencies
|
||||||
self::dependencies(isset($this->database, $this->settings, $url, $filename, $width, $height));
|
self::dependencies(isset($this->database, $this->settings, $url, $filename, $width, $height));
|
||||||
|
|
||||||
@ -397,6 +407,14 @@ class Photo extends Module {
|
|||||||
|
|
||||||
public function adjustFile($path, $info) {
|
public function adjustFile($path, $info) {
|
||||||
|
|
||||||
|
# Function rotates and flips a photo based on its EXIF orientation
|
||||||
|
# Excepts the following:
|
||||||
|
# (string) $path = Path to the photo-file
|
||||||
|
# (array) $info = ['orientation', 'width', 'height']
|
||||||
|
# Returns the following
|
||||||
|
# (array) $info = ['orientation', 'width', 'height'] = Success
|
||||||
|
# (boolean) false = Failure
|
||||||
|
|
||||||
# Check dependencies
|
# Check dependencies
|
||||||
self::dependencies(isset($path, $info));
|
self::dependencies(isset($path, $info));
|
||||||
|
|
||||||
@ -528,9 +546,11 @@ class Photo extends Module {
|
|||||||
|
|
||||||
public static function prepareData($data) {
|
public static function prepareData($data) {
|
||||||
|
|
||||||
# This function requires the following photo-attributes and turns them
|
# Function turns photo-attributes into a front-end friendly format. Note that some attributes remain unchanged.
|
||||||
# into a front-end friendly format: id, title, tags, public, star, album, thumbUrl, takestamp, url
|
# Excepts the following:
|
||||||
# Note that some attributes remain unchanged
|
# (array) $data = ['id', 'title', 'tags', 'public', 'star', 'album', 'thumbUrl', 'takestamp', 'url']
|
||||||
|
# Returns the following:
|
||||||
|
# (array) $photo
|
||||||
|
|
||||||
# Check dependencies
|
# Check dependencies
|
||||||
self::dependencies(isset($data));
|
self::dependencies(isset($data));
|
||||||
|
Loading…
Reference in New Issue
Block a user