-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
57 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
namespace Packaged\Dispatch\Component; | ||
|
||
interface FixedClassComponent | ||
{ | ||
public function getComponentClass(): string; | ||
} |
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
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,26 @@ | ||
<?php | ||
namespace Packaged\Dispatch\Tests\TestComponents; | ||
|
||
use Packaged\Dispatch\Component\FixedClassComponent; | ||
use Packaged\Dispatch\Component\UiComponent; | ||
use Packaged\Dispatch\ResourceManager; | ||
use Packaged\Helpers\Path; | ||
|
||
abstract class AbstractComponent extends UiComponent implements FixedClassComponent | ||
{ | ||
public function getResourceDirectory() | ||
{ | ||
return Path::system(__DIR__, 'DemoComponent'); | ||
} | ||
|
||
protected function _requireResources(ResourceManager $manager) | ||
{ | ||
$manager->requireCss('style.css'); | ||
} | ||
|
||
public function getComponentClass(): string | ||
{ | ||
return self::class; | ||
} | ||
|
||
} |
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,9 @@ | ||
<?php | ||
namespace Packaged\Dispatch\Tests\TestComponents\DemoComponent; | ||
|
||
use Packaged\Dispatch\Tests\TestComponents\AbstractComponent; | ||
|
||
class ChildComponent extends AbstractComponent | ||
{ | ||
|
||
} |