/** * Get the current playing mode (repeat/shuffle/etc). * * @param Controller $controller The Controller to grab the state of * * @return static */ protected function getMode(Controller $controller) { $mode = $controller->getMode(); $this->repeat = $mode["repeat"]; $this->shuffle = $mode["shuffle"]; $this->crossfade = $controller->getCrossfade(); return $this; }