src/Mouf/MoufPropertyDescriptor.php
public static function getPropertyNameFromSetterName($methodName) {
		if (strpos($methodName, "set") !== 0) {
			throw new MoufException("Error while creating MoufPropertyDescriptor. A @Property annotation must be set to methods that start with 'set'. For instance: setName, and setPhone are valid @Property setters. $methodName is not a valid setter name.");
		}
		$propName1 = substr($methodName, 3);
		if (empty($propName1)) {
			 throw new MoufException("Error while creating MoufPropertyDescriptor. A @Property annotation cannot be put on a method named 'set'. It must be put on a method whose name starts with 'set'. For instance: setName, and setPhone are valid @Property setters.");
		}
		$propName2 = strtolower(substr($propName1,0,1)).substr($propName1,1);
		return $propName2;
	}
public static function getPropertyNameFromSetterName($methodName) {
		if (strpos($methodName, "set") !== 0) {
			throw new MoufException("Error while creating MoufPropertyDescriptor. A @Property annotation must be set to methods that start with 'set'. For instance: setName, and setPhone are valid @Property setters. $methodName is not a valid setter name.");
		}
		$propName1 = substr($methodName, 3);
		if (empty($propName1)) {
			 throw new MoufException("Error while creating MoufPropertyDescriptor. A @Property annotation cannot be put on a method named 'set'. It must be put on a method whose name starts with 'set'. For instance: setName, and setPhone are valid @Property setters.");
		}
		$propName2 = strtolower(substr($propName1,0,1)).substr($propName1,1);
		return $propName2;
	}
public static function getPropertyNameFromSetterName ( $ methodName ) { if ( strpos ( $ methodName , "set" ) !== 0 ) { throw new MoufException ( "Error while creating MoufPropertyDescriptor. A @Property annotation must be set to methods that start with 'set'. For instance: setName, and setPhone are valid @Property setters. $methodName is not a valid setter name." ) ; } $ propName1 = substr ( $ methodName , 3 ) ; if ( empty ( $ propName1 ) ) { throw new MoufException ( "Error while creating MoufPropertyDescriptor. A @Property annotation cannot be put on a method named 'set'. It must be put on a method whose name starts with 'set'. For instance: setName, and setPhone are valid @Property setters." ) ; } $ propName2 = strtolower ( substr ( $ propName1 , 0 , 1 ) ) . substr ( $ propName1 , 1 ) ; return $ propName2 ; }
Transforms the setter name in a property name.
For instance, getPhone => phone or getName => name

@param string $methodName
@return string
Transforms the setter name in a property name . For instance getPhone = > phone or getName = > name