Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:dao:mediadao

This is an old revision of the document!


MediaDao

Layer: DAO · Source: lib/dao/MediaDao.php:22 (lines 22–663)


class MediaDao extends Dao

Docblock Metadata

^ Tag ^ Value ^
| ''@category'' | Dao Class |
| ''@author'' | M.Noermoehammad |
| ''@license'' | MIT |
| ''@version'' | 1.0 |
| ''@since'' | Since Release 1.0 |

Inheritance

^ Relation ^ Type ^ Meaning ^
| extends | [[scriptlog:lib:core:dao|''Dao'']] | parent class/interface |

Constants (0)

None.

Properties (0)

None declared.

Methods (22)

^ Visibility ^ Method ^ Summary ^ Line ^
| public | ''__construct()'' | (undocumented) | 26 |
| public | ''findAllMedia()'' | Find All Media | 39 |
| public | ''findMediaById()'' | Find media by Id | 88 |
| public | ''findMediaByType()'' | Find media by media format type | 118 |
| public | ''findMediaMetaValue()'' | find mediameta by it's id and key | 147 |
| public | ''findAllMediaBlog()'' | Find all media for Blog | 169 |
| public | ''findMediaBlog()'' | Find media for blog based on ID | 189 |
| public | ''findAllMediaPage()'' | findAllMediaPage | 214 |
| public | ''findMediaPage()'' | findMediaPage | 236 |
| public | ''createMedia()'' | Add new media | 260 |
| public | ''createMediaMeta()'' | Add new media meta | 285 |
| public | ''updateMedia()'' | Update Media | 306 |
| public | ''updateMediaMeta()'' | updateMediaMeta | 343 |
| public | ''deleteMedia()'' | Delete Media | 365 |
| public | ''checkMediaId()'' | Check media's Id | 385 |
| public | ''dropDownMediaAccess()'' | drop down media access | 403 |
| public | ''dropDownMediaTarget()'' | dropDownMediaTarget() | 425 |
| public | ''dropDownMediaStatus()'' | dropDownMediaStatus | 445 |
| public | ''dropDownMediaSelect()'' | dropDownMediaSelect() | 465 |
| public | ''imageRadioButton()'' | imageRadioButton | 515 |
| public | ''imageUploadHandler()'' | imageUploadHandler | 583 |
| public | ''totalMediaRecords()'' | Total media records | 650 |

__construct()

public function __construct()

lines 26–29 (4)

Takes no parameters.

findAllMedia()

public function findAllMedia($orderBy = 'ID', $user_level = null)

lines 39–78 (40)

Find All Media

^ Parameter ^ Type ^ Default ^ Description ^
| ''$orderBy'' | ''(untyped)'' | '''ID''' | //none// |
| ''$user_level'' | ''(untyped)'' | ''null'' | //none// |

Returns: (none declared) — array

findMediaById()

public function findMediaById($mediaId, $sanitize)

lines 88–108 (21)

Find media by Id

^ Parameter ^ Type ^ Default ^ Description ^
| ''$mediaId'' | ''(untyped)'' | //required// | //none// |
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — mixed

findMediaByType()

public function findMediaByType($type)

lines 118–137 (20)

Find media by media format type

^ Parameter ^ Type ^ Default ^ Description ^
| ''$type'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — array

findMediaMetaValue()

public function findMediaMetaValue($mediaId, $media_filename, $sanitize)

lines 147–160 (14)

find mediameta by it's id and key

^ Parameter ^ Type ^ Default ^ Description ^
| ''$mediaId'' | ''(untyped)'' | //required// | //none// |
| ''$media_filename'' | ''(untyped)'' | //required// | //none// |
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

findAllMediaBlog()

public function findAllMediaBlog($orderBy = 'ID')

lines 169–181 (13)

Find all media for Blog

^ Parameter ^ Type ^ Default ^ Description ^
| ''$orderBy'' | ''(untyped)'' | '''ID''' | //none// |

Returns: (none declared) — mixed

findMediaBlog()

public function findMediaBlog($mediaId)

lines 189–205 (17)

Find media for blog based on ID

^ Parameter ^ Type ^ Default ^ Description ^
| ''$mediaId'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

findAllMediaPage()

public function findAllMediaPage($orderBy = 'ID')

lines 214–227 (14)

findAllMediaPage

^ Parameter ^ Type ^ Default ^ Description ^
| ''$orderBy'' | ''(untyped)'' | '''ID''' | //none// |

Returns: (none declared) — mixed

findMediaPage()

public function findMediaPage($mediaId)

lines 236–251 (16)

findMediaPage

^ Parameter ^ Type ^ Default ^ Description ^
| ''$mediaId'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — mixed

createMedia()

public function createMedia($bind)

lines 260–276 (17)

Add new media

^ Parameter ^ Type ^ Default ^ Description ^
| ''$bind'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

createMediaMeta()

public function createMediaMeta($bind)

lines 285–295 (11)

Add new media meta

^ Parameter ^ Type ^ Default ^ Description ^
| ''$bind'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

updateMedia()

public function updateMedia($sanitize, $bind, $mediaId)

lines 306–332 (27)

Update Media

^ Parameter ^ Type ^ Default ^ Description ^
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |
| ''$bind'' | ''(untyped)'' | //required// | //none// |
| ''$mediaId'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

updateMediaMeta()

public function updateMediaMeta($sanitize, $bind, $mediaId)

lines 343–355 (13)

updateMediaMeta

^ Parameter ^ Type ^ Default ^ Description ^
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |
| ''$bind'' | ''(untyped)'' | //required// | //none// |
| ''$mediaId'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — void

deleteMedia()

public function deleteMedia($mediaId, $sanitize)

lines 365–374 (10)

Delete Media

^ Parameter ^ Type ^ Default ^ Description ^
| ''$mediaId'' | ''(untyped)'' | //required// | //none// |
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

checkMediaId()

public function checkMediaId($id, $sanitize)

lines 385–393 (9)

Check media's Id

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — numeric

dropDownMediaAccess()

public function dropDownMediaAccess($selected = "")

lines 403–414 (12)

drop down media access

set media access

^ Parameter ^ Type ^ Default ^ Description ^
| ''$selected'' | ''(untyped)'' | ''""'' | //none// |

Returns: (none declared) — string

dropDownMediaTarget()

public function dropDownMediaTarget($selected = "")

lines 425–436 (12)

dropDownMediaTarget()

set media target

^ Parameter ^ Type ^ Default ^ Description ^
| ''$selected'' | ''(untyped)'' | ''""'' | //none// |

Returns: (none declared) — string

dropDownMediaStatus()

public function dropDownMediaStatus($selected = "")

lines 445–456 (12)

dropDownMediaStatus

^ Parameter ^ Type ^ Default ^ Description ^
| ''$selected'' | ''(untyped)'' | ''""'' | //none// |

Returns: (none declared) — string

dropDownMediaSelect()

public function dropDownMediaSelect($selected = null)

lines 465–506 (42)

dropDownMediaSelect()

^ Parameter ^ Type ^ Default ^ Description ^
| ''$selected'' | ''(untyped)'' | ''null'' | //none// |

Returns: (none declared) — string

imageRadioButton()

public function imageRadioButton($checked = null)

lines 515–575 (61)

imageRadioButton

^ Parameter ^ Type ^ Default ^ Description ^
| ''$checked'' | ''(untyped)'' | ''null'' | //none// |

Returns: (none declared) — mixed

imageUploadHandler()

public function imageUploadHandler($mediaId = null)

lines 583–640 (58)

imageUploadHandler

^ Parameter ^ Type ^ Default ^ Description ^
| ''$mediaId'' | ''(untyped)'' | ''null'' | //none// |

Returns: (none declared)

totalMediaRecords()

public function totalMediaRecords(array $data = []): ?int

lines 650–662 (13)

Total media records

^ Parameter ^ Type ^ Default ^ Description ^
| ''$data'' | ''array'' | ''[]'' | = null |

Returns: ?int — integer|numeric

Imports

^ Alias ^ Fully-qualified name ^
| ''ActionConst'' | [[scriptlog:lib:core:actionconst|''Scriptlog\Core\ActionConst'']] |
| ''Dao'' | [[scriptlog:lib:core:dao|''Scriptlog\Core\Dao'']] |
| ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] |

This page is generated from source by 'tools/gendoc'. Edits will be overwritten.

scriptlog/lib/dao/mediadao.1790413760.txt.gz · Last modified: by admin