\Charcoal\Cms\Service\LoaderNewsLoader

News Loader

Summary

Methods
Properties
Constants
__construct()
modelFactory()
collectionLoader()
all()
newsProto()
published()
expired()
upcoming()
archive()
median()
objType()
setMedian()
setObjType()
No public properties found
No constants found
setModelFactory()
setCollectionLoader()
$modelFactory
$collectionLoader
$objType
$median
N/A
No private methods found
No private properties found
N/A

Properties

$modelFactory

$modelFactory : \Charcoal\Factory\FactoryInterface

Store the factory instance for the current class.

Type

\Charcoal\Factory\FactoryInterface

$collectionLoader

$collectionLoader : \Charcoal\Loader\CollectionLoader

Store the collection loader for the current class.

Type

\Charcoal\Loader\CollectionLoader

$objType

$objType : object

Type

object — The object to load.

$median

$median : string

Type

string — The median between upcoming and archive entries.

Methods

__construct()

__construct(array  $data) 

NewsLoader constructor.

Parameters

array $data

The Data.

Throws

\Exception

When there is missing data.

modelFactory()

modelFactory() : \Charcoal\Factory\FactoryInterface

Retrieve the object model factory.

Throws

\RuntimeException

If the model factory was not previously set.

Returns

\Charcoal\Factory\FactoryInterface

collectionLoader()

collectionLoader() : \Charcoal\Loader\CollectionLoader

Retrieve the model collection loader.

Throws

\RuntimeException

If the collection loader was not previously set.

Returns

\Charcoal\Loader\CollectionLoader

all()

all() : \Charcoal\Loader\CollectionLoader

Returns

\Charcoal\Loader\CollectionLoader

newsProto()

newsProto() 

published()

published() : \Charcoal\Loader\CollectionLoader

Returns

\Charcoal\Loader\CollectionLoader

expired()

expired() : \Charcoal\Loader\CollectionLoader

Returns

\Charcoal\Loader\CollectionLoader

upcoming()

upcoming() : \Charcoal\Loader\CollectionLoader

Fetch upcoming entries based on the median or now.

Returns

\Charcoal\Loader\CollectionLoader

archive()

archive() : \Charcoal\Loader\CollectionLoader

Fetch upcoming entries based on the median or now.

Returns

\Charcoal\Loader\CollectionLoader

median()

median() : mixed

Returns

mixed

objType()

objType() : object

Returns

object

setMedian()

setMedian(string  $median) : self

Parameters

string $median

The median between upcoming and archive.

Returns

self

setObjType()

setObjType(object  $objType) : self

Parameters

object $objType

The object type.

Returns

self

setModelFactory()

setModelFactory(\Charcoal\Factory\FactoryInterface  $factory) : self

Set an object model factory.

Parameters

\Charcoal\Factory\FactoryInterface $factory

The model factory, to create objects.

Returns

self

setCollectionLoader()

setCollectionLoader(\Charcoal\Loader\CollectionLoader  $loader) : self

Set a model collection loader.

Parameters

\Charcoal\Loader\CollectionLoader $loader

The collection loader.

Returns

self