-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from sitegeist/feature/componentAwareDataStruc…
…tures Feature/component aware data structures
- Loading branch information
Showing
5 changed files
with
72 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace SMS\FluidComponents\Interfaces; | ||
|
||
/** | ||
* By implementing ComponentAware in a data structure, fluid | ||
* components will provide the component namespace to the data | ||
* structure when used in a component call so that the data structure | ||
* can behave differently for each component (e. g. by reading | ||
* something from the component's directory) | ||
*/ | ||
interface ComponentAware | ||
{ | ||
public function setComponentNamespace(string $componentNamespace): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace SMS\FluidComponents\Interfaces; | ||
|
||
/** | ||
* ConstructibleFromNull defines an alternative constructor | ||
* which initializes the object without any input | ||
*/ | ||
interface ConstructibleFromNull | ||
{ | ||
/** | ||
* Creates an instance of the class | ||
* | ||
* @return object | ||
*/ | ||
public static function fromNull(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters