Roland Haeder [Sat, 21 Mar 2015 21:14:16 +0000 (22:14 +0100)]
Checked change of access level protected -> private:
- All class fields must be private and *should always* have protected setters
as changing "internal" fields (data, in particular object instances) can lead
to unexpected behaviour and then it is *very, very* hard to trace those bugs.
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Wed, 18 Mar 2015 00:40:49 +0000 (01:40 +0100)]
Small rewrite for better use of closeFile():
- closeFile() is now no longer be callable publicly. If a file needs to be
closed, it can simply be set to NULL (or unset). Class fields which points to
such objects (e.g. pointerInstance) should always be set to NULL and not
removed as this may cause checks with is_null() to trigger an E_NOTICE:
<?php
error_reporting(E_ALL);
class Object {}
$var = new Object();
$isNull = is_null($var);
var_dump($isNull);
unset($var);
$isNull = is_null($var);
var_dump($isNull);
?>
Being set to NULL or completly unset is a different thing.
- Updated 'core' to latest commit
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Sat, 7 Mar 2015 22:07:11 +0000 (23:07 +0100)]
Continued with crawler:
- Added class constant STACKER_NAME_URLS for stacker name 'urls'
- enrichCrawlerQueueData() is still unfinished as there *must* be added more entries
- Updated 'core' to latest commit
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Sat, 7 Mar 2015 18:18:44 +0000 (19:18 +0100)]
Continued with crawler:
- initUrlSourceTask() cannot be called in constructor as this would lead to a
missing entry in seachTask() method
- Renamed crawler classes from *UrlGetterTask to *UrlCrawlerTask
- Added new field urlSourceInstance which requires an interface UrlSource
- TODOs.txt updated
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Sat, 7 Mar 2015 17:54:54 +0000 (18:54 +0100)]
Continued with crawler:
- Renamed method processStack() to fillUrlStack() to reflect its purpose
- Added isUrlStackEmpty() to interface as it is now public
- Added new base class BaseUrlSourceTask which will initialize all such tasks
by creating the proper URL source instance
- Contants belong to top of classes
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Fri, 6 Mar 2015 23:26:35 +0000 (00:26 +0100)]
Continued with crawler:
- The indexed array needs to be converted to assoziative as other URL sources
may use index X for something else.
- Renamed $isLoaded to $isAdded as it fits more
- Updated 'core' to latest commit
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Thu, 5 Mar 2015 21:07:22 +0000 (22:07 +0100)]
Continued with crawler:
- Made some noisy debug lines quiet (commented out)
- Added parseCsvEntry() as a stub (only debug lines)
- Some other minor improvements
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Thu, 5 Mar 2015 02:01:10 +0000 (03:01 +0100)]
Continued with crawler:
- Renamed parseCsvEntry() to parseCsvFile() as it reads a CSV file
- Added check method if a CSV entry is stacked
- Updated 'core' to latest commit
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Thu, 19 Feb 2015 10:26:47 +0000 (11:26 +0100)]
Implementation of isOwnAddress() basicly finished:
- ... which will check if the currently saved UNL is the same as own external
or internal UNL (internal only returns IP!!!).
- Introduced getCurrentUniversalNodeLocator()
- Updated 'core'
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Fri, 30 Jan 2015 00:34:18 +0000 (01:34 +0100)]
Continued with refacturing:
- Deleted deprecated stuff, such as the ConnectionRegistry class as there is
now only a SocketRegistry.
- More cleanups (e.g. no longer used config entry and many more)
- Use more ShareableInfo class which main contain a Listenable or
ConnectionHelper instance. If both is missing, please report this.
- Updated 'core'
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Thu, 29 Jan 2015 20:53:48 +0000 (21:53 +0100)]
Continued with refactoring:
- Added ShareableInfo interface
- Added ConnectionInfo class which can be filled by Listenable classes and
ConnectionHelper classes. This fixes a bug that isSocketRegistered(),
registerSocket() and so on, are only accepting a Listenable class and not
the other.
- Updated 'core'
- UNFINISHED!
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Fri, 23 Jan 2015 20:58:12 +0000 (21:58 +0100)]
Continued rewrite:
- Added discoverListenerInstance() to inteface
- Introduced new generic class BaseIpV4ConnectionHelper
- ... and moved some methods to it
- Other rewrites + more debug lines added (mostly commented out)
- Updated 'core'
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Sun, 11 Jan 2015 20:51:25 +0000 (21:51 +0100)]
Continued with crawler (won't work with out-dated core):
- Added new method to check stack size for added CSV files
- Added empty stub for adding entries from loaded CSV file
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Tue, 23 Dec 2014 12:55:43 +0000 (13:55 +0100)]
Continued with refacturing:
- Removed no longer needed port which was only for TCP/UDP connections
- Added UniversalNodeLocator class
- Some parts are now "basicly finished", still there is a lot work to do
- Updated 'core' to latest commit id
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Mon, 15 Dec 2014 20:23:31 +0000 (21:23 +0100)]
Continued rewriting:
- IPs are a little "static" which means that you only connect to Internet nodes.
Universal node locators (UNL) give you the ability to connect also to node
which are not available over the internet, such as "fax nodes".
- Updated core
- Added new script for finding bad scripts
- Added more stuff towards refacturing to protocol handler
- Introduced discoverUniversalNodeLocatorByConfiguredAddress()
- Introduced resolveUniversalNodeLocatorFromConfigKey()
- Other rewrites
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Mon, 15 Dec 2014 18:30:01 +0000 (19:30 +0100)]
Continued with refacturing:
- renamed some variables
- expanded bootstrap node with protocol to fit UNL scheme (protocol://address[:port])
- added another die() as this part needs overworking, too
- introduced detectOwnUniversalNodeLocator()
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Sun, 7 Dec 2014 18:23:04 +0000 (19:23 +0100)]
Continued a little:
- Added resolveUniversalResourceLocatorFromNodeHelper() to interface
- BaseProtocolResolver now expandes BaseHubSystem to have some setters back.
- Improved comments here and there
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Tue, 11 Nov 2014 21:40:18 +0000 (22:40 +0100)]
Added more UNL (Universal Node Locator) stuff:
- Added interface for protocol resolvers
- Added factory for same class
- Added (lifeless) TCP resolver (NodeHelper -> LocateableNode resolver)
- The UNL is now a class implementation (see interface LocateableNode)
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Sat, 25 Oct 2014 11:13:32 +0000 (13:13 +0200)]
More rewrites (and code stops):
- Renamed a lot variables towards UNL (universal node locator) which allows not
just ip:port locators but in a more URI-like style: protocol://address[:port]
'address' could also be a fax number where you want to establish a
"connection" to by sending the serialized base64-encoded data to.
- Renamed methods to reflect latest rewrites
- Updated core to latest changes
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Fri, 17 Oct 2014 18:46:44 +0000 (20:46 +0200)]
Continued on refacturing from string to ProtocolHandler:
- Moved some classes to core as they become "generic" (generalized code).
- 'core' updated to latest commit
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Wed, 8 Oct 2014 21:44:04 +0000 (23:44 +0200)]
Refacturing to pass a ProtocolHandler instance instead of the direct name. This
makes the code more flexible to other protocol handlers including FAX
"connections" and many fancy stuff more.
This refacuring is not complete.
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Fri, 17 Oct 2014 21:17:42 +0000 (23:17 +0200)]
Continued:
- Added new general HubHelper interface and let it extend/implement by suitable classes/interfaces
- Used the new interface as type-hint in enqueueRawDataFromTemplate()
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Fri, 17 Oct 2014 18:46:44 +0000 (20:46 +0200)]
Continued on refacturing from string to ProtocolHandler:
- Moved some classes to core as they become "generic" (generalized code).
- 'core' updated to latest commit
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Wed, 8 Oct 2014 21:44:04 +0000 (23:44 +0200)]
Refacturing to pass a ProtocolHandler instance instead of the direct name. This
makes the code more flexible to other protocol handlers including FAX
"connections" and many fancy stuff more.
This refacuring is not complete.
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Fri, 17 Oct 2014 21:17:42 +0000 (23:17 +0200)]
Continued:
- Added new general HubHelper interface and let it extend/implement by suitable classes/interfaces
- Used the new interface as type-hint in enqueueRawDataFromTemplate()
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Fri, 17 Oct 2014 18:46:44 +0000 (20:46 +0200)]
Continued on refacturing from string to ProtocolHandler:
- Moved some classes to core as they become "generic" (generalized code).
- 'core' updated to latest commit
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Wed, 8 Oct 2014 21:44:04 +0000 (23:44 +0200)]
Refacturing to pass a ProtocolHandler instance instead of the direct name. This
makes the code more flexible to other protocol handlers including FAX
"connections" and many fancy stuff more.
This refacuring is not complete.
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Tue, 22 Jul 2014 21:22:36 +0000 (23:22 +0200)]
Cleanup + added debug lines:
- cleaned up no longer used paths (previously copied to 'node' wit SVN)
- added noisy debug lines to fix an error in announcement
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Tue, 22 Jul 2014 18:54:28 +0000 (20:54 +0200)]
Continued:
- fixed bad handlig in NodeDistributedHashTableDatabaseWrapper
- improved other stuff (communicator, ...)
- used new 'core' (only chash.php)
Signed-off-by: Roland Haeder <roland@mxchange.org>
Roland Haeder [Wed, 25 Jun 2014 17:50:41 +0000 (19:50 +0200)]
Continued:
- added a Minable interface for minable blocks
- added a HashBlock class which can be "mined"
- added missing debug output in some state factories
- added 'booting' state for block miners
- used updated 'core'
Signed-off-by: Roland Haeder <roland@mxchange.org>