Documentation

EasyBlogImage extends EasyBlog
in package

Table of Contents

Properties

$app  : mixed
$config  : mixed
$db  : mixed
$doc  : mixed
$input  : mixed
$jconfig  : mixed
$lang  : mixed
$my  : mixed
$string  : mixed
$xssTags  : mixed
$imageTypes  : mixed

Methods

__construct()  : mixed
canUpload()  : mixed
Proper check for file contents to ensure user doesn't upload anything funky
canUploadFile()  : mixed
Proper check for file contents to ensure user doesn't upload anything funky
containsXSS()  : mixed
Checks if the file contains any funky html tags
convertBase64()  : mixed
Converts base64 image values into proper image data
countFiles()  : mixed
download()  : mixed
Downloads an external image given a url
getAvatarDimension()  : mixed
getAvatarRelativePath()  : mixed
Retrieves the relative path to the respective avatar storage
getError()  : mixed
getErrors()  : mixed
getExtension()  : mixed
Retrieves a file extension given the name
getFileName()  : mixed
Given a url for the file, get the name
getTypeIcon()  : file
Checks if the file is an image
getWebpFallbackName()  : mixed
Retrieve the file name of the fallback image of a webp image
hasError()  : mixed
hasErrors()  : mixed
imageResize()  : mixed
isExceededFilesizeLimit()  : mixed
Determines if the image size exceeded limit
isExtensionAllowed()  : mixed
Determines if the image extension is allowed
isImage()  : mixed
Checks if an image file name is an image type
isMobile()  : mixed
Determines if this is a mobile layout
isTablet()  : mixed
Determines if this is a tablet layout
isUnsplashImage()  : mixed
Checks if an image file name is an image type
isWebp()  : mixed
Determine if the image is on webp format
loadLanguage()  : mixed
Helper method to load language
parseSize()  : mixed
processAMP()  : mixed
Process image to be used in AMP Article
processInstantImages()  : mixed
Process image to be used in Instant Articles
rel2abs()  : mixed
setError()  : mixed
contentsContainXss()  : mixed
Determines if the contents contains any of the known possible xss tags
getMessageObj()  : mixed
Generates a standard response

Properties

$app

public mixed $app = \null

$config

public mixed $config = \null

$db

public mixed $db = \null

$doc

public mixed $doc = \null

$input

public mixed $input = \null

$jconfig

public mixed $jconfig = \null

$lang

public mixed $lang = \null

$my

public mixed $my = \null

$string

public mixed $string = \null

$xssTags

public static mixed $xssTags = ['abbr', 'acronym', 'address', 'applet', 'area', 'audioscope', 'base', 'basefont', 'bdo', 'bgsound', 'big', 'blackface', 'blink', 'blockquote', 'body', 'bq', 'br', 'button', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'comment', 'custom', 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'fn', 'font', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'keygen', 'kbd', 'label', 'layer', 'legend', 'li', 'limittext', 'link', 'listing', 'map', 'marquee', 'menu', 'meta', 'multicol', 'nobr', 'noembed', 'noframes', 'noscript', 'nosmartquotes', 'object', 'ol', 'optgroup', 'option', 'param', 'plaintext', 'pre', 'rt', 'ruby', 's', 'samp', 'script', 'select', 'server', 'shadow', 'sidebar', 'small', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'tt', 'ul', 'var', 'wbr', 'xml', 'xmp', '!DOCTYPE', '!--']

$imageTypes

private mixed $imageTypes = ['gif', 'jpg', 'jpeg', 'png', 'jfif', 'webp']

Methods

__construct()

public __construct() : mixed

canUpload()

Proper check for file contents to ensure user doesn't upload anything funky

public canUpload(mixed $file, mixed &$err) : mixed
Parameters
$file : mixed
$err : mixed
Tags
since
5.1
access

public

canUploadFile()

Proper check for file contents to ensure user doesn't upload anything funky

public canUploadFile(mixed $file) : mixed
Parameters
$file : mixed
Tags
since
5.1
access

public

containsXSS()

Checks if the file contains any funky html tags

public containsXSS(mixed $path) : mixed
Parameters
$path : mixed
Tags
since
5.1
access

public

convertBase64()

Converts base64 image values into proper image data

public convertBase64(mixed $str) : mixed
Parameters
$str : mixed
Tags
since
6.0.0
access

public

countFiles()

public static countFiles(mixed $dir) : mixed
Parameters
$dir : mixed

download()

Downloads an external image given a url

public download(mixed $url) : mixed
Parameters
$url : mixed
Tags
since
5.4.0
access

public

getAvatarDimension()

public static getAvatarDimension(mixed $avatar) : mixed
Parameters
$avatar : mixed

getAvatarRelativePath()

Retrieves the relative path to the respective avatar storage

public static getAvatarRelativePath([mixed $type = 'profile' ]) : mixed
Parameters
$type : mixed = 'profile'
Tags
since
4.0
access

public

getError()

public getError() : mixed

getErrors()

public getErrors() : mixed

getExtension()

Retrieves a file extension given the name

public getExtension(mixed $path) : mixed
Parameters
$path : mixed
Tags
since
5.4.0
access

public

getFileName()

Given a url for the file, get the name

public getFileName(mixed $imageUrl) : mixed
Parameters
$imageUrl : mixed
Tags
since
5.4.0
access

public

getTypeIcon()

Checks if the file is an image

public static getTypeIcon(mixed $fileName) : file
Parameters
$fileName : mixed
Return values
file

type

getWebpFallbackName()

Retrieve the file name of the fallback image of a webp image

public getWebpFallbackName(mixed $fileName) : mixed

NOTE: Fallback image is needed due to webp image is not yet 100% supported at all browsers

Parameters
$fileName : mixed
Tags
since
6.0.0
access

public

hasError()

public hasError() : mixed

hasErrors()

public hasErrors() : mixed

imageResize()

public static imageResize(mixed $width, mixed $height, mixed $target) : mixed
Parameters
$width : mixed
$height : mixed
$target : mixed

isExceededFilesizeLimit()

Determines if the image size exceeded limit

public isExceededFilesizeLimit(mixed $size) : mixed
Parameters
$size : mixed
Tags
since
5.4.0
access

public

isExtensionAllowed()

Determines if the image extension is allowed

public isExtensionAllowed(mixed $extension) : mixed
Parameters
$extension : mixed
Tags
since
5.4.0
access

public

isImage()

Checks if an image file name is an image type

public isImage(mixed $fileName) : mixed
Parameters
$fileName : mixed
Tags
since
5.1
access

public

isMobile()

Determines if this is a mobile layout

public isMobile() : mixed
Tags
since
5.1
access

public

isTablet()

Determines if this is a tablet layout

public isTablet() : mixed
Tags
since
5.3
access

public

isUnsplashImage()

Checks if an image file name is an image type

public isUnsplashImage(mixed $fileName) : mixed
Parameters
$fileName : mixed
Tags
since
5.1
access

public

isWebp()

Determine if the image is on webp format

public isWebp(mixed $fileName) : mixed
Parameters
$fileName : mixed
Tags
since
6.0.0
access

public

loadLanguage()

Helper method to load language

public loadLanguage([mixed $admin = false ]) : mixed
Parameters
$admin : mixed = false
Tags
since
5.0
access

public

parseSize()

public parseSize(mixed $size) : mixed
Parameters
$size : mixed

processAMP()

Process image to be used in AMP Article

public processAMP(mixed $content[, mixed $userId = '' ]) : mixed
Parameters
$content : mixed
$userId : mixed = ''
Tags
since
5.1
access

public

processInstantImages()

Process image to be used in Instant Articles

public processInstantImages(mixed $content) : mixed
Parameters
$content : mixed
Tags
since
5.1
access

public

rel2abs()

public static rel2abs(mixed $rel, mixed $base) : mixed
Parameters
$rel : mixed
$base : mixed

setError()

public setError(mixed $msg) : mixed
Parameters
$msg : mixed

contentsContainXss()

Determines if the contents contains any of the known possible xss tags

private contentsContainXss(mixed $contents) : mixed
Parameters
$contents : mixed
Tags
since
5.4.0
access

public

getMessageObj()

Generates a standard response

private getMessageObj([mixed $code = '' ][, mixed $message = '' ][, mixed $item = false ]) : mixed
Parameters
$code : mixed = ''
$message : mixed = ''
$item : mixed = false
Tags
since
5.4.0
access

public


        
On this page

Search results