Kronolith_Driver::colors PHP Method

colors() public method

Returns the colors of the current calendar.
public colors ( ) : array
return array The calendar background and foreground color.
    public function colors()
    {
        $color = $this->backgroundColor();
        return array($color, Kronolith::foregroundColor($color));
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param Kronolith_Driver $driver  The backend driver that this event is
  *                                  stored in.
  * @param mixed $eventObject        Backend specific event object
  *                                  that this will represent.
  */
 public function __construct(Kronolith_Driver $driver, $eventObject = null)
 {
     $this->calendar = $driver->calendar;
     list($this->_backgroundColor, $this->_foregroundColor) = $driver->colors();
     if (!is_null($eventObject)) {
         $this->fromDriver($eventObject);
     }
 }