PHP Class M1\Vars\Resource\ResourceProvider

Since: 0.1.0
Inheritance: extends AbstractResource, use trait M1\Vars\Traits\ResourceFlagsTrait
显示文件 Open project: m1/Vars Class Usage Examples

Public Properties

Property Type Description
$vars M1\Vars\Vars The parent Vars class

Public Methods

Method Description
__construct ( Vars $vars, string | array $entity, boolean $relative = true, boolean $recursive = false ) The ResourceProvider constructor creates the content from the entity
addParentContent ( array $content ) Adds content to the parent content array
getParentContent ( ) : mixed Returns the parent content
mergeParentContent ( ) : ResourceProvider Merges the content and the parent content together

Private Methods

Method Description
addContent ( array $content ) Adds content to the parent contents
createResources ( array $resources, string $type ) Creates the FileResource|ResourceProvider from the resource
getSupportedFilesInDir ( string $entity ) : array | boolean Returns the supported files using the extensions from the loaders in the entity which is a directory
mergeContents ( ) : array Merges various configuration contents into one array
parseEntity ( string $entity ) Creates the content from the entity
processEntity ( string | array $entity, string $type ) Creates the content from the entity

Method Details

__construct() public method

The ResourceProvider constructor creates the content from the entity
public __construct ( Vars $vars, string | array $entity, boolean $relative = true, boolean $recursive = false )
$vars M1\Vars\Vars The calling Vars class
$entity string | array The configuration entity
$relative boolean Is the entity relative to the calling entity or class
$recursive boolean If entity a dir, do you want to recursively check directories

addParentContent() public method

Adds content to the parent content array
public addParentContent ( array $content )
$content array The content to add

getParentContent() public method

Returns the parent content
public getParentContent ( ) : mixed
return mixed The parent content

mergeParentContent() public method

Merges the content and the parent content together
public mergeParentContent ( ) : ResourceProvider
return ResourceProvider

Property Details

$vars public_oe property

The parent Vars class
public Vars,M1\Vars $vars
return M1\Vars\Vars