ContentManager
class ContentManager implements ContentManagerInterface
Content providers registry manager
Traits
Constants
PROVIDERS_FILE_NAME |
Default providers config file name |
Properties
protected array | $comments | Config array comments | from PhpConfigFile |
protected array|null | $contentProviders | Content providers | |
protected null | $contentTypeRegistry | Content type registry |
Methods
Export array as text
Constructor
Return true if content typ eexists
Get content type from registry
Get content type registry
Create content item
Load content providers and content types
Get content providers list
Get content provider
Check if provider exists
Register content provider
Unregister content provider
Details
in PhpConfigFile at line 33
array|null
include(string $fileName)
Include config file
in PhpConfigFile at line 44
array|null
includePhpArray(string $fileName)
Include php array
in PhpConfigFile at line 62
protected void
setComment(string $comment, string $key)
Set array key comment
in PhpConfigFile at line 73
protected string
getCommentsText(string $key)
Get array imtem comment as text
in PhpConfigFile at line 100
protected string
exportArray(array $data, string $arrayKey, int $currentTab = 1, int $endTab = 1)
Export array as text
in PhpConfigFile at line 144
protected string
exportItem(string $key, mixed $value, int $maxTabs)
Export item as text
in PhpConfigFile at line 158
protected string
exportConfig(array $data)
Export config as text
in PhpConfigFile at line 245
bool
saveConfigFile(string $fileName, array $data)
Save config file
at line 59
__construct(string|null $providersFileName = null)
Constructor
at line 70
bool
hasContentType(string $name)
Return true if content typ eexists
at line 81
ContentProviderInterface|null
type(string $name, string|null $providerName = null)
Get content type from registry
at line 107
object
typeRegistry()
Get content type registry
at line 123
mixed
createItem(mixed $data, string $contentType)
Create content item
at line 147
void
load(bool $reload = false)
Load content providers and content types
at line 161
array
getProviders(string|null $category = null, string|null $contentType = null)
Get content providers list
at line 184
ContentProviderInterface|null
provider(string $name)
Get content provider
at line 204
bool
hasProvider(string $name)
Check if provider exists
at line 215
bool
registerProvider(object|string $provider)
Register content provider
at line 244
bool
unRegisterProvider(string $name)
Unregister content provider
at line 264
protected array
resolveProviderDetails(ContentProviderInterface $provider)
Resolve provider edetails