Library/Bullhorn/FastRest/Api/Services/Date/Formatter.php
public function setCurrentFormat($currentFormat) {
        $allowedFormats = $this->getAllowedFormats();
        if(!in_array($currentFormat, $allowedFormats)) {
            throw new InvalidArgumentException('Invalid Date Format: ' . $currentFormat . ', expected: ' . implode(', ', $allowedFormats));
        }

        $allFormats = $this->getPreviousFormats();
        $allFormats[] = $this->getCurrentFormat();
        $this->setPreviousFormats($allFormats);

        $this->currentFormat = $currentFormat;
    }
public function setCurrentFormat($currentFormat) {
        $allowedFormats = $this->getAllowedFormats();
        if(!in_array($currentFormat, $allowedFormats)) {
            throw new InvalidArgumentException('Invalid Date Format: ' . $currentFormat . ', expected: ' . implode(', ', $allowedFormats));
        }

        $allFormats = $this->getPreviousFormats();
        $allFormats[] = $this->getCurrentFormat();
        $this->setPreviousFormats($allFormats);

        $this->currentFormat = $currentFormat;
    }
public function setCurrentFormat ( $ currentFormat ) { $ allowedFormats = $ this -> getAllowedFormats ( ) ; if ( ! in_array ( $ currentFormat , $ allowedFormats ) ) { throw new InvalidArgumentException ( 'Invalid Date Format: ' . $ currentFormat . ', expected: ' . implode ( ', ' , $ allowedFormats ) ) ; } $ allFormats = $ this -> getPreviousFormats ( ) ; $ allFormats [ ] = $ this -> getCurrentFormat ( ) ; $ this -> setPreviousFormats ( $ allFormats ) ; $ this -> currentFormat = $ currentFormat ; }
Sets the current format
@param string $currentFormat
Sets the current format