Ferreteria/v0.6/clade/Sys/FileSys/Aspect: Difference between revisions
< Ferreteria | v0.6 | clade | Sys | FileSys
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
| Line 13: | Line 13: | ||
}} | }} | ||
==Code== | ==Code== | ||
''as of {{fmt/date|2025|11|05}}'' | |||
{{fmt/php/block|1= | {{fmt/php/block|1= | ||
interface iAspect extends BaseIface { | interface iAspect extends BaseIface { | ||
Latest revision as of 14:42, 5 November 2025
| ||||||||||||||||
Code
interface iAspect extends BaseIface {
static function FromNode(NodeIface $o) : self;
}
abstract class caAspect extends BaseClass implements iAspect {
// ++ CONFIG ++ //
protected function NodeClass() : string { return NodeClass::class; }
// -- CONFIG -- //
// ++ SETUP ++ //
public static function FromNode(NodeIface $o) : iAspect {
$oThis = new static;
$oThis->Node($o);
return $oThis;
}
// -- SETUP -- //
// ++ STRUCT ++ //
private $oNode = NULL;
protected function Node(?NodeIface $o=NULL) : NodeIface { return is_object($o) ? ($this->oNode = $o) : ($this->oNode ?? ($this->oNode = $this->NewNode())); }
abstract protected function NewNode() : NodeIface;
// -- STRUCT -- //
}