Skip to content
Mathieu Nayrolles edited this page Jan 20, 2016 · 1 revision

Hooks

Hooks controller.

The Hooks controllers handle different hooks. As of now:

  • default hook (on index) Jack slack bot
  • email hook to compute and send automated email.

Properties

$quotes

private array $quotes = array("Did no one come to save me just because they missed me?", "I can let you drown", "The world’s still the same. There’s just less in it", "Did everyone see that? Because I will not be doing it again", "Why is all the rum gone?", "Close your eyes and pretend all a bad dream. That’s how I get by", "Better to not know which moment may be your last alive to be mystery of it all", "I regret nothing, ever", "My tremendous intuitive sense of the female creature informs me that you are in trouble", "What a man can do and what a man can’t do", "The problem is not the problem. The problem is your attitude about the problem. Do you understand?", "The seas may be rough, but I am the Captain! No matter how difficult I will always prevail", "This is the day you will always remember as the day you almost caught Captain Jack Sparrow", "Wherever we want to go, we go", "Why fight when you can negotiate?", "If you choose to lock your heart away, you’ll lose it for certain", "You’ve stolen me and I’m here to take myself back", "Not all treasure is silver and gold mate", "My spirit will live on")

Captain Jack (slack bot) quotes.

TODO: This could go to a dedicated config file or even a csv.

  • Visibility: private

$instance

private object $instance

Reference to the CI singleton

  • Visibility: private
  • This property is static.

Methods

__construct

void CI_Controller::__construct()

Class constructor

index

String Hooks::index()

Default hook used by the Cpt Jack slackbot

Supported commands are:

  • Jack nbusers
  • Jack nbmeasures
  • Jack nbwatches
  • Jack whois email
  • Jack help

Each command results will be followed by a quote.

  • Visibility: public

email

mixed Hooks::email(String $key, integer $time)

Email hook.

Compute and send automated email at $time

  • Visibility: public

Arguments

  • $key String - <p>authorization key</p>
  • $time integer - <p>hours from now to compute the emails. Only used for testing. Compute the email in the future.</p>

get_instance

object CI_Controller::get_instance()

Get the CI singleton

  • Visibility: public
  • This method is static.
  • This method is defined by CI_Controller
Clone this wiki locally