src/Mouf/Reflection/MoufReflectionMethod.php
public function toJson() {
    	$result = array();
    	$result['name'] = $this->getName();
    
    	$modifier = "";
    	if ($this->isPublic()) {
    		$modifier = "public";
    	} elseif ($this->isProtected()) {
    		$modifier = "protected";
    	} elseif ($this->isPrivate()) {
    		$modifier = "private";
    	}
    	$result['modifier'] = $modifier;
    	$result['static'] = $this->isStatic();
    	$result['abstract'] = $this->isAbstract();
    	$result['constructor'] = $this->isConstructor();
    	$result['final'] = $this->isFinal();
    	//$result['comment'] = $this->getDocComment();
    	$result['comment'] = $this->getMoufPhpDocComment()->getJsonArray();
    
    	$result['parameters'] = array();
    	$parameters = $this->getParameters();
    	foreach ($parameters as $parameter) {
    		$result['parameters'][] = $parameter->toJson();
    	}
    
    	//$properties = $this->getAnnotations("Property");
    	try {
    		/*if (!empty($properties)) {
    		 $result['moufProperty'] = true;*/
    		
    		// TODO: is there a need to instanciate a  MoufPropertyDescriptor?
    		
    		// If this is a setter only:
    		
    		if ($this->isSetter()) {
	    		$moufPropertyDescriptor = new MoufPropertyDescriptor($this);
	    		$types = $moufPropertyDescriptor->getTypes();
	    		$result['types'] = $types->toJson();
	    		
	    		if ($types->getWarningMessage()) {
	    			$result['classinerror'] = $types->getWarningMessage();
	    		}
    		}
    		
    		/*if ($moufPropertyDescriptor->isAssociativeArray()) {
    			$result['keytype'] = $moufPropertyDescriptor->getKeyType();
    		}
    		if ($moufPropertyDescriptor->isArray()) {
    			$result['subtype'] = $moufPropertyDescriptor->getSubType();
    		}*/
    		//}
    	} catch (\Exception $e) {
    		$result['classinerror'] = $e->getMessage();
    	}
    	
    
    	return $result;
    }
public function toJson() {
    	$result = array();
    	$result['name'] = $this->getName();
    
    	$modifier = "";
    	if ($this->isPublic()) {
    		$modifier = "public";
    	} elseif ($this->isProtected()) {
    		$modifier = "protected";
    	} elseif ($this->isPrivate()) {
    		$modifier = "private";
    	}
    	$result['modifier'] = $modifier;
    	$result['static'] = $this->isStatic();
    	$result['abstract'] = $this->isAbstract();
    	$result['constructor'] = $this->isConstructor();
    	$result['final'] = $this->isFinal();
    	//$result['comment'] = $this->getDocComment();
    	$result['comment'] = $this->getMoufPhpDocComment()->getJsonArray();
    
    	$result['parameters'] = array();
    	$parameters = $this->getParameters();
    	foreach ($parameters as $parameter) {
    		$result['parameters'][] = $parameter->toJson();
    	}
    
    	//$properties = $this->getAnnotations("Property");
    	try {
    		/*if (!empty($properties)) {
    		 $result['moufProperty'] = true;*/
    		
    		// TODO: is there a need to instanciate a  MoufPropertyDescriptor?
    		
    		// If this is a setter only:
    		
    		if ($this->isSetter()) {
	    		$moufPropertyDescriptor = new MoufPropertyDescriptor($this);
	    		$types = $moufPropertyDescriptor->getTypes();
	    		$result['types'] = $types->toJson();
	    		
	    		if ($types->getWarningMessage()) {
	    			$result['classinerror'] = $types->getWarningMessage();
	    		}
    		}
    		
    		/*if ($moufPropertyDescriptor->isAssociativeArray()) {
    			$result['keytype'] = $moufPropertyDescriptor->getKeyType();
    		}
    		if ($moufPropertyDescriptor->isArray()) {
    			$result['subtype'] = $moufPropertyDescriptor->getSubType();
    		}*/
    		//}
    	} catch (\Exception $e) {
    		$result['classinerror'] = $e->getMessage();
    	}
    	
    
    	return $result;
    }
public function toJson ( ) { $ result = array ( ) ; $ result [ 'name' ] = $ this -> getName ( ) ; $ modifier = "" ; if ( $ this -> isPublic ( ) ) { $ modifier = "public" ; } elseif ( $ this -> isProtected ( ) ) { $ modifier = "protected" ; } elseif ( $ this -> isPrivate ( ) ) { $ modifier = "private" ; } $ result [ 'modifier' ] = $ modifier ; $ result [ 'static' ] = $ this -> isStatic ( ) ; $ result [ 'abstract' ] = $ this -> isAbstract ( ) ; $ result [ 'constructor' ] = $ this -> isConstructor ( ) ; $ result [ 'final' ] = $ this -> isFinal ( ) ; //$result['comment'] = $this->getDocComment(); $ result [ 'comment' ] = $ this -> getMoufPhpDocComment ( ) -> getJsonArray ( ) ; $ result [ 'parameters' ] = array ( ) ; $ parameters = $ this -> getParameters ( ) ; foreach ( $ parameters as $ parameter ) { $ result [ 'parameters' ] [ ] = $ parameter -> toJson ( ) ; } //$properties = $this->getAnnotations("Property"); try { /*if (!empty($properties)) {
    		 $result['moufProperty'] = true;*/ // TODO: is there a need to instanciate a  MoufPropertyDescriptor?
 // If this is a setter only:
 if ( $ this -> isSetter ( ) ) { $ moufPropertyDescriptor = new MoufPropertyDescriptor ( $ this ) ; $ types = $ moufPropertyDescriptor -> getTypes ( ) ; $ result [ 'types' ] = $ types -> toJson ( ) ; if ( $ types -> getWarningMessage ( ) ) { $ result [ 'classinerror' ] = $ types -> getWarningMessage ( ) ; } } /*if ($moufPropertyDescriptor->isAssociativeArray()) {
    			$result['keytype'] = $moufPropertyDescriptor->getKeyType();
    		}
    		if ($moufPropertyDescriptor->isArray()) {
    			$result['subtype'] = $moufPropertyDescriptor->getSubType();
    		}*/ //} } catch ( \ Exception $ e ) { $ result [ 'classinerror' ] = $ e -> getMessage ( ) ; } return $ result ; }
Returns a PHP array representing the method.

@return array
Returns a PHP array representing the method .