src/Peach/DT/TimeEquator.php
private function initFields($fields)
    {
        switch ($fields) {
            case Time::TYPE_DATE:
                return $this->initFields(array("year", "month", "date"));
            case Time::TYPE_DATETIME:
                return $this->initFields(array("year", "month", "date", "hour", "minute"));
            case Time::TYPE_TIMESTAMP:
                return $this->initFields(array("year", "month", "date", "hour", "minute", "second"));
        }

        if (is_array($fields)) {
            return count($fields) ? $fields : null;
        }
        if (is_string($fields)) {
            return array($fields);
        }
        
        return null;
    }
private function initFields($fields)
    {
        switch ($fields) {
            case Time::TYPE_DATE:
                return $this->initFields(array("year", "month", "date"));
            case Time::TYPE_DATETIME:
                return $this->initFields(array("year", "month", "date", "hour", "minute"));
            case Time::TYPE_TIMESTAMP:
                return $this->initFields(array("year", "month", "date", "hour", "minute", "second"));
        }

        if (is_array($fields)) {
            return count($fields) ? $fields : null;
        }
        if (is_string($fields)) {
            return array($fields);
        }
        
        return null;
    }
private function initFields ( $ fields ) { switch ( $ fields ) { case Time :: TYPE_DATE : return $ this -> initFields ( array ( "year" , "month" , "date" ) ) ; case Time :: TYPE_DATETIME : return $ this -> initFields ( array ( "year" , "month" , "date" , "hour" , "minute" ) ) ; case Time :: TYPE_TIMESTAMP : return $ this -> initFields ( array ( "year" , "month" , "date" , "hour" , "minute" , "second" ) ) ; } if ( is_array ( $ fields ) ) { return count ( $ fields ) ? $ fields : null ; } if ( is_string ( $ fields ) ) { return array ( $ fields ) ; } return null ; }
このオブジェクトの比較対象フィールド一覧を初期化します.

@param  mixed $fields
@return array
このオブジェクトの比較対象フィールド一覧を初期化します .