You are here

static function cmfcCalendarV1::factory in Calendar Systems 8.2

Same name and namespace in other branches
  1. 8 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::factory()
  2. 5 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::factory()
  3. 6.3 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::factory()
  4. 6 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::factory()
  5. 7.3 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::factory()
  6. 7 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::factory()
  7. 7.2 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::factory()
3 calls to cmfcCalendarV1::factory()
cmfcCalendar::factory in calendar/calendar.class.inc.php
cmfcCalendarV1::getAllStrings in calendar/v1/calendarV1.class.inc.php
* Get list of translatable strings
cmfcCalendarV1::getYmdwMonthAsNavigationalArray in calendar/v1/calendarV1.class.inc.php

File

calendar/v1/calendarV1.class.inc.php, line 55

Class

cmfcCalendarV1

Code

static function factory($options) {
  if (isset($options['name'])) {
    require_once dirname(__FILE__) . '/calendarV1.plugin.class.inc.php';
    $className = 'cmfcCalendarV1' . ucfirst($options['name']);
    $file = dirname(__FILE__) . '/calendarSystems/' . $options['name'] . '.class.inc.php';
    if (!class_exists($className)) {
      require_once $file;
    }
    return new $className($options);
  }
  else {
    return new cmfcCalendarV1(array());
  }
}