Difference between revisions of "Assembly line objects"

From Apibot
Jump to: navigation, search
(a list of the objects types (probably more will follow))
 
(+ set_slot_params_from_signal)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
Every Assembly line object belongs to one of the following types:
+
All Assembly line objects share some common features. They inherit those from the Line_Slot class, from which all their classes ultimately descend.
  
* [[Apibot 0.40 Assembly line feeders|Feeders]] - supply data to the assembly line
+
== Public properties ==
* [[Apibot 0.40 Assembly line fetchers|Fetchers]] - fetch full wiki objects by some identificator (eg. pages by titles)
 
* [[Apibot 0.40 Assembly line filters|Filters]] - let through only data that matches given criteria, or reorder the data
 
* [[Apibot 0.40 Assembly line signal|Signal modifiers]] - modify signals and their properties in some way
 
* [[Apibot 0.40 Assembly line workers|Workers]] - process the data in one way or another
 
* [[Apibot 0.40 Assembly line writers|Writers]] - write the processed data (back to the wiki, or to a file, etc.)
 
  
Each of those types is in an appropriate subtree inside the /line subdirectory in the bot.
+
* <code>$explicit name</code> - in addition to the slot name, which is specific for the objects class, you can assign an explicit name, specific to each object from the same class. Added to the slot name, it forms the full name of the object. It is used to determine the line object full name parameter group, and is written in the Apibot logs and some error messages. Default: none.
 +
* <code>$default_data_key</code> - the key to the signals data block that will be considered default by this object, and processed by it. Default: "*".
 +
* <code>$set_slot_params_from_signal</code> (v0.40.21+) - typically the object will take parameters from signal parameters group that is named for the object full name, slot name or type name (in that precedence). If this property is set to <code>false</code>, the object will not take parameters from the signal. Default: <code>true</code>.
 +
* <code>$preserve_slot_signal_params</code> - after setting object parameters from signal parameters group, the object will delete this parameters group from the signal. If this property is set to <code>false</code>, the parameters group will not be deleted. If the property is set to a string, the parameters group will be renamed to "type." plus this string, if it was named for the object type, to "name." plus this string, if it was named for the object slot name, and to "object." plus this string, if it was named for the object full name. Default: <code>true</code>.
 +
 
 +
== Public methods ==
 +
 
 +
* <code>is_linked()</code> - returns <code>true</code> if there is at least one other line object linked to (after) this one, <code>false</code> if there is none.
 +
* <code>linked_with()</code> - returns an array with all line objects linked to (after) this one.
 +
 
 +
* <code>link_with ( $object, $backcall = true )</code> - links <code>$object</code> (must be a line object) after this one. If <code>$backcall</code> is true, makes <code>$object</code> also linked to this one (this is the typical case). If <code>$backcall</code> is false, <code>$object</code> will not be linked back to this one (do this only if you know VERY well what you are doing).
 +
* <code>link_to ( $object, $backcall = true )</code> - links this line object after <code>$object</code> (must be a line object). If <code>$backcall</code> is true, makes <code>$object</code> also linked with this one (this is the typical case). If <code>$backcall</code> is false, <code>$object</code> will not be linked with this one (do this only if you know VERY well what you are doing).
 +
 
 +
* <code>unlink ( $object, $backcall = true )</code> - unlinks <code>$object</code> (must be a line object, linked after this one) from this one. If <code>$backcall</code> is true, makes <code>$object</code> also unlink from this one (this is the typical case). If <code>$backcall</code> is false, <code>$object</code> will not be unlinked from this one (do this only if you know VERY well what you are doing).
 +
* <code>unlink_from ( $object, $backcall = true )</code> - unlinks <code>$object</code> (must be a line object this one is linked after) from this one. If <code>$backcall</code> is true, makes <code>$object</code> also unlink from this one (this is the typical case). If <code>$backcall</code> is false, <code>$object</code> will not be unlinked from this one (do this only if you know VERY well what you are doing).
 +
 
 +
* <code>process ( &$signal )</code> - processes a signal (incl. propagates it to the line objects after this one).
 +
 
 +
== See also ==
 +
 
 +
* [[Assembly line feeders]]
 +
* [[Assembly line fetchers]]
 +
* [[Assembly line filters]]
 +
* [[Assembly line workers]]
 +
* [[Assembly line writers]]
 +
 
 +
* [[Assembly line interface]]
 +
 
 +
* [[Main Page]]

Latest revision as of 15:47, 5 November 2014

All Assembly line objects share some common features. They inherit those from the Line_Slot class, from which all their classes ultimately descend.

Public properties

  • $explicit name - in addition to the slot name, which is specific for the objects class, you can assign an explicit name, specific to each object from the same class. Added to the slot name, it forms the full name of the object. It is used to determine the line object full name parameter group, and is written in the Apibot logs and some error messages. Default: none.
  • $default_data_key - the key to the signals data block that will be considered default by this object, and processed by it. Default: "*".
  • $set_slot_params_from_signal (v0.40.21+) - typically the object will take parameters from signal parameters group that is named for the object full name, slot name or type name (in that precedence). If this property is set to false, the object will not take parameters from the signal. Default: true.
  • $preserve_slot_signal_params - after setting object parameters from signal parameters group, the object will delete this parameters group from the signal. If this property is set to false, the parameters group will not be deleted. If the property is set to a string, the parameters group will be renamed to "type." plus this string, if it was named for the object type, to "name." plus this string, if it was named for the object slot name, and to "object." plus this string, if it was named for the object full name. Default: true.

Public methods

  • is_linked() - returns true if there is at least one other line object linked to (after) this one, false if there is none.
  • linked_with() - returns an array with all line objects linked to (after) this one.
  • link_with ( $object, $backcall = true ) - links $object (must be a line object) after this one. If $backcall is true, makes $object also linked to this one (this is the typical case). If $backcall is false, $object will not be linked back to this one (do this only if you know VERY well what you are doing).
  • link_to ( $object, $backcall = true ) - links this line object after $object (must be a line object). If $backcall is true, makes $object also linked with this one (this is the typical case). If $backcall is false, $object will not be linked with this one (do this only if you know VERY well what you are doing).
  • unlink ( $object, $backcall = true ) - unlinks $object (must be a line object, linked after this one) from this one. If $backcall is true, makes $object also unlink from this one (this is the typical case). If $backcall is false, $object will not be unlinked from this one (do this only if you know VERY well what you are doing).
  • unlink_from ( $object, $backcall = true ) - unlinks $object (must be a line object this one is linked after) from this one. If $backcall is true, makes $object also unlink from this one (this is the typical case). If $backcall is false, $object will not be unlinked from this one (do this only if you know VERY well what you are doing).
  • process ( &$signal ) - processes a signal (incl. propagates it to the line objects after this one).

See also