PHP Class M1\Vars\Loader\AbstractLoader

Since: 0.1.0
Show file Open project: m1/Vars

Public Properties

Property Type Description
$supported array The supported extensions

Protected Properties

Property Type Description
$content mixed The content from the entity
$entity string The passed entity to be loaded

Public Methods

Method Description
__construct ( string $entity ) Construct the loader with the passed entity
getContent ( ) : mixed Returns the content
load ( ) : mixed The function what loads the content from the entity
setSupports ( array $supports ) Sets what the loader supports
supports ( ) : boolean Checks whether the loader supports the file extension

Method Details

__construct() public method

Construct the loader with the passed entity
public __construct ( string $entity )
$entity string The passed entity

getContent() public method

Returns the content
public getContent ( ) : mixed
return mixed The content

load() abstract public method

The function what loads the content from the entity
abstract public load ( ) : mixed
return mixed

setSupports() public method

Sets what the loader supports
public setSupports ( array $supports )
$supports array Set the extensions the loader supports

supports() public method

Checks whether the loader supports the file extension
public supports ( ) : boolean
return boolean Does the loader support the file

Property Details

$content protected property

The content from the entity
protected mixed $content
return mixed

$entity protected property

The passed entity to be loaded
protected string $entity
return string

$supported public static property

The supported extensions
public static array $supported
return array