Skip to content
Commits on Source (2)
......@@ -11,7 +11,7 @@ Then add to your composer.json :
```json
"require": {
...
"php-extended/php-information-interface": "~3",
"php-extended/php-information-interface": "~4",
...
}
```
......
<?php
namespace PhpExtended\Information;
/**
* InformationDataTimedInterface interface file.
*
* This interface represents a data information which is timely qualified.
*
* @author Anastaszor
*/
interface InformationDataTimedInterface extends InformationDataInterface, InformationTimedInterface
{
// nothing to add
}
......@@ -8,6 +8,8 @@ namespace PhpExtended\Information;
* This interface is for all informations that are gatherered. It permits to
* have a single entry point for all type of informations.
*
* This interface should not be implemented directly.
*
* @author Anastaszor
*/
interface InformationInterface
......@@ -27,6 +29,13 @@ interface InformationInterface
*/
public function isRelationInformation();
/**
* Gets whether this information is timely qualified.
*
* @return boolean
*/
public function isTimedInformation();
/**
* Makes the given visitor to visit this interface.
*
......
<?php
namespace PhpExtended\Information;
/**
* InformationRelationDataTimedInterface interface file.
*
* This interface represents a relation which carries data and is timely
* qualified.
*
* @author Anastaszor
*/
interface InformationRelationDataTimedInterface extends InformationRelationDataInterface, InformationTimedInterface
{
// nothing to add
}
<?php
namespace PhpExtended\Information;
/**
* InformationRelationTimedInterface interface file.
*
* This interface represents a relation information which is timely qualified.
*
* @author Anastaszor
*/
interface InformationRelationTimedInterface extends InformationRelationInterface, InformationTimedInterface
{
// nothing to add
}
<?php
namespace PhpExtended\Information;
/**
* InformationTimedInterface interface file.
*
* This interface represents an information which is timely qualified.
*
* This interface should not be implemented directly.
*
* @author Anastaszor
*/
interface InformationTimedInterface extends InformationInterface
{
/**
* Gets the format in which the time string should be transmitted or stored.
*
* @return string
*/
public function getTimeFormat();
/**
* Gets the time value in a date time object.
*
* @return \DateTime
*/
public function getTimeValue();
}
......@@ -21,6 +21,14 @@ interface InformationVisitorInterface
*/
public function visitData(InformationDataInterface $informationData);
/**
* Makes this visitor visits specifically an information of type timed data.
*
* @param InformationDataTimedInterface $informationTimedData
* @return boolean whether the visit may continue.
*/
public function visitTimedData(InformationDataTimedInterface $informationTimedData);
/**
* Makes this visitor visits specifically an information of type relation.
*
......@@ -29,6 +37,15 @@ interface InformationVisitorInterface
*/
public function visitRelation(InformationRelationInterface $informationRelation);
/**
* Makes this visitor visits specifically an information of type timed
* relation.
*
* @param InformationRelationTimedInterface $informationTimedRelation
* @return boolean whether the visit may continue.
*/
public function visitTimedRelation(InformationRelationTimedInterface $informationTimedRelation);
/**
* Makes this visitor visits specifically an information of type relation
* data.
......@@ -38,4 +55,13 @@ interface InformationVisitorInterface
*/
public function visitRelationData(InformationRelationDataInterface $informationRelationData);
/**
* Makes this visitor visits specifically an information of type timed
* relation data.
*
* @param InformationRelationDataTimedInterface $informationTimedRelationData
* @return boolean whether the visit may continue.
*/
public function visitTimedRelationData(InformationRelationDataTimedInterface $informationTimedRelationData);
}