src/Mouf/MoufInstancePropertyDescriptor.php
private function toInstanceDescriptor($instanceNames) {
		if ($instanceNames === null) {
			return null;
		}
		if (is_array($instanceNames)) {
			$moufManager = $this->moufManager;
			return self::array_map_deep($instanceNames, function($instanceName) use ($moufManager) {
				if ($instanceName != null) {
					return $moufManager->getInstanceDescriptor($instanceName);
				} else {
					return null;
				}
			});
			/*$arrayOfDescriptors = array();
			foreach ($instanceNames as $key=>$instanceName) {
				if ($instanceName != null) {
					$arrayOfDescriptors[$key] = $this->moufManager->getInstanceDescriptor($instanceName);
				} else {
					$arrayOfDescriptors[$key] = null;
				}
			}
			return $arrayOfDescriptors;*/
		} else {
			return $this->moufManager->getInstanceDescriptor($instanceNames);
		}
		
	}
private function toInstanceDescriptor($instanceNames) {
		if ($instanceNames === null) {
			return null;
		}
		if (is_array($instanceNames)) {
			$moufManager = $this->moufManager;
			return self::array_map_deep($instanceNames, function($instanceName) use ($moufManager) {
				if ($instanceName != null) {
					return $moufManager->getInstanceDescriptor($instanceName);
				} else {
					return null;
				}
			});
			/*$arrayOfDescriptors = array();
			foreach ($instanceNames as $key=>$instanceName) {
				if ($instanceName != null) {
					$arrayOfDescriptors[$key] = $this->moufManager->getInstanceDescriptor($instanceName);
				} else {
					$arrayOfDescriptors[$key] = null;
				}
			}
			return $arrayOfDescriptors;*/
		} else {
			return $this->moufManager->getInstanceDescriptor($instanceNames);
		}
		
	}
private function toInstanceDescriptor ( $ instanceNames ) { if ( $ instanceNames === null ) { return null ; } if ( is_array ( $ instanceNames ) ) { $ moufManager = $ this -> moufManager ; return self :: array_map_deep ( $ instanceNames , function ( $ instanceName ) use ( $ moufManager ) { if ( $ instanceName != null ) { return $ moufManager -> getInstanceDescriptor ( $ instanceName ) ; } else { return null ; } } ) ; /*$arrayOfDescriptors = array();
			foreach ($instanceNames as $key=>$instanceName) {
				if ($instanceName != null) {
					$arrayOfDescriptors[$key] = $this->moufManager->getInstanceDescriptor($instanceName);
				} else {
					$arrayOfDescriptors[$key] = null;
				}
			}
			return $arrayOfDescriptors;*/ } else { return $ this -> moufManager -> getInstanceDescriptor ( $ instanceNames ) ; } }
Takes in parameter a return from the getBoundComponentsXXX methods and cast that to a MoufInstanceDescriptor
or an array of MoufInstanceDescriptor.

@param string[]|string $instanceNames
@return NULL|multitype:NULL Ambigous <\Mouf\MoufInstanceDescriptor, \Mouf\array<string,> |Ambigous <\Mouf\MoufInstanceDescriptor, \Mouf\array<string,>
Takes in parameter a return from the getBoundComponentsXXX methods and cast that to a MoufInstanceDescriptor or an array of MoufInstanceDescriptor .