Source: ~/vendor/october/rain/src/Halcyon/Datasource/Datasource.php

Datasource base class.

Protected properties

protected bool $forceDeleting

Indicates if the record is currently being force deleted.

protected October\Rain\Halcyon\Processors\Processor $postProcessor

The query post processor implementation.

protected array $emitterSingleEventCollection

Collection of registered events to be fired once only.

protected array $emitterEventCollection

Collection of registered events.

protected array $emitterEventSorted

Sorted collection of events.

Public methods

public self bindEvent($event, $callback, $priority=0)

Create a new event binding.

  • $event
  • $callback
  • $priority

public self bindEventOnce($event, $callback)

Create a new event binding that fires once only

  • $event
  • $callback

public array fireEvent(string $event, array $params=array(), boolean $halt=false)

Fire an event and call the listeners.

  • string $event - Event name
  • array $params - Event parameters
  • boolean $halt - Halt after first non-null result

public void forceDelete(string $dirName, string $fileName, string $extension)

Force the deletion of a record against the datasource

  • string $dirName
  • string $fileName
  • string $extension

public October\Rain\Halcyon\Processors\Processor getPostProcessor()

Get the query post processor used by the connection.

public void makeCacheKey($name='')

Generate a cache key unique to this datasource.

  • $name

public self unbindEvent(string $event=NULL)

Destroys an event binding.

  • string $event - Event to destroy

Protected methods

protected array emitterEventSortEvents(string $eventName)

Sort the listeners for a given event by priority.

  • string $eventName