PHP에서 디자인 패턴을 사용하는 메서드에 대한 문서를 작성하려고합니다. 일반적으로 메소드에는 관찰자, 인터셉트 필터 및 통지자가 포함됩니다. 이것을 어떻게 php docs에 맞는 형식으로 작성할 수 있습니까? 설명서를 작성하는 함수의 예는 다음과 같습니다. 그리고 내 서식이 꺼져있어 문서 작성에 더 익숙해 질 수 있는지 알려주십시오.PHP에서 디자인 패턴을 문서화하는 방법
/**
* Creates a checkbox input element with options passed too it.
*
* @see PVHTML::getStandardAttributes()
* @see PVHTML::getEventAttributes()
* @see PVHTML::getStandardAttributes()
* @see self::getFormAttributes()
*
* @param string $name The name of the input being generated. Will be the input field's name
* @param array $options Options than can be used to further distinguish the element. The options are
* the same values that will be passed through PVHTML::getStandardAttributes, PVHTML::getEventAttributes
* and get the self::getFormAttributes functions
* @param array $css_options Options than can define how the CSS is styled around the form the div around the element.
* Options will be passed to PVHTML::getStandardAttributes() and PVHTML::getEventAttributes(). Have the option
* 'disable_css' will disable the div surrouding the element.
*
* @return string $element The string that creates the element
* @access public
*/
public static function checkbox($name, $options=array(), $css_options=array()) {
if(self::_hasAdapter(get_class(), __FUNCTION__))
return self::_callAdapter(get_class(), __FUNCTION__, $name, $options, $css_options);
$filtered = self::_applyFilter(get_class(), __FUNCTION__ , array('name'=>$name, 'options'=>$options, 'css_options'=>$css_options), array('event'=>'args'));
$name = $filtered['name'];
$options = $filtered['options'];
$css_options = $filtered['css_options'];
$css_defaults=array('class'=>'form-checkbox');
$css_options += $css_defaults;
$input = self::input($name, 'checkbox', $options, $css_options);;
self::_notify(get_class().'::'.__FUNCTION__, $input, $name, $options, $css_options);
$input = self::_applyFilter(get_class(), __FUNCTION__ , $input , array('event'=>'return'));
return $input;
}