key = \is_null( $key ) ? \uniqid() : $key; //$this->setKey( $key ); } /* public function setKey( $key ) { $this->key = $key; } //*/ public function getKey() { return $this->key; } public function toString() : string { return \strval( $this->getKey() ); } public function __destruct() { //$this->log->trace( "." ); //parent::__destruct(); foreach( $this as $key => $toDestruct ) if ( isset( $this->$key ) ) unset( $this->$key ); } public function getClassName( bool $fqcn=null ) : string { return self::getStaticClassName( $fqcn ); } public static function getStaticClassName( bool $fqcn=null ) : string { //return $fqcn ? parent::getStaticClassName( $fqcn ).self::CLASS_SEPARATOR.__CLASS__ : __CLASS__; return __CLASS__; } }