Factory
in package
implements
FactoryInterface
FinalYes
Factory for creating Track instances.
Table of Contents
Interfaces
- FactoryInterface
- Factory for creating Track instances.
Properties
Methods
- __construct() : mixed
- Create an instance of the Factory class.
- createFromUri() : TrackInterface
- Create a new Track instance from a URI.
- createFromXml() : TrackInterface
- Create a new Track instance from a URI.
- guessTrackClass() : TrackInterface>
- Get the name of the Track class that represents a URI.
Properties
$controller
private
ControllerInterface
$controller
A Controller instance to communicate with.
Methods
__construct()
Create an instance of the Factory class.
public
__construct(ControllerInterface $controller) : mixed
Parameters
- $controller : ControllerInterface
-
A Controller instance to communicate with
createFromUri()
Create a new Track instance from a URI.
public
createFromUri(string $uri) : TrackInterface
Parameters
- $uri : string
-
The URI of the track
Return values
TrackInterfacecreateFromXml()
Create a new Track instance from a URI.
public
createFromXml(ElementInterface $xml) : TrackInterface
Parameters
- $xml : ElementInterface
-
The xml element representing the track meta data.
Return values
TrackInterfaceguessTrackClass()
Get the name of the Track class that represents a URI.
private
guessTrackClass(string $uri) : TrackInterface>
Parameters
- $uri : string
-
The URI of the track