protected function getAccessors(array $fields = null)
    {
        $accessors = [];

        foreach ($fields as $field) {
            if ($field->isMultipleAnswers()) {
                $content = $this->getStubContent('model-accessor-multiple-answers');

                $accessors[] = $this->getAccessor($field, $content);
            }

            if ($field->isDateOrTime()) {
                $content = $this->getStubContent('model-accessor-datetime');
                $this->replaceDateFormat($content, $field->dateFormat);

                $accessors[] = $this->getAccessor($field, $content);
            }
        }

        return implode(PHP_EOL, $accessors);
    }
protected function getAccessors(array $fields = null)
    {
        $accessors = [];

        foreach ($fields as $field) {
            if ($field->isMultipleAnswers()) {
                $content = $this->getStubContent('model-accessor-multiple-answers');

                $accessors[] = $this->getAccessor($field, $content);
            }

            if ($field->isDateOrTime()) {
                $content = $this->getStubContent('model-accessor-datetime');
                $this->replaceDateFormat($content, $field->dateFormat);

                $accessors[] = $this->getAccessor($field, $content);
            }
        }

        return implode(PHP_EOL, $accessors);
    }
protected function getAccessors ( array $ fields = null ) { $ accessors = [ ] ; foreach ( $ fields as $ field ) { if ( $ field -> isMultipleAnswers ( ) ) { $ content = $ this -> getStubContent ( 'model-accessor-multiple-answers' ) ; $ accessors [ ] = $ this -> getAccessor ( $ field , $ content ) ; } if ( $ field -> isDateOrTime ( ) ) { $ content = $ this -> getStubContent ( 'model-accessor-datetime' ) ; $ this -> replaceDateFormat ( $ content , $ field -> dateFormat ) ; $ accessors [ ] = $ this -> getAccessor ( $ field , $ content ) ; } } return implode ( PHP_EOL , $ accessors ) ; }
Gets accessors for each field that accepts multiple answers.

@param  array  $fields

@return string
Gets accessors for each field that accepts multiple answers .