You are here

function twitter_puller::check_arguments in Twitter Pull 6.2

Same name and namespace in other branches
  1. 6 twitter_pull.class.inc \twitter_puller::check_arguments()
  2. 7.2 twitter_pull.class.inc \twitter_puller::check_arguments()
  3. 7 twitter_pull.class.inc \twitter_puller::check_arguments()
1 call to twitter_puller::check_arguments()
twitter_puller::__construct in ./twitter_pull.class.inc

File

./twitter_pull.class.inc, line 31
twitter pull class implementation

Class

twitter_puller
@file twitter pull class implementation

Code

function check_arguments() {
  if (empty($this->twitkey) || drupal_strlen($this->twitkey) < 2) {
    throw new Exception(t('Twitter key may not be empty.'));
  }
  $num = intval($this->num_items);
  if ($num <= 0 || $num > 200) {
    throw new Exception(t('Number of Twitter items to pull must be a positive integer less than or equal to 200.'));
  }
}