src/FS/File/PHP/Parser/Array.php
private function parseMethod( $matches, &$openBlocks )
	{
		$method	= $this->methodData;
		$method['name']		= $matches[5];
		$method['access']	= trim( $matches[3] );
		$method['abstract']	= (bool) $matches[1];
		$method['final']	= (bool) $matches[2];
		$method['static']	= (bool) $matches[4];
		if( trim( $matches[6] ) )
		{
			$paramList	= array();
			foreach( explode( ",", $matches[6] ) as $param )
			{
				$param	 = trim( $param );
				if( !preg_match( $this->regexParam, $param, $matches ) )
					continue;
				$param	= array(
					'cast'		=> $matches[2],
					'reference'	=> $matches[4] ? TRUE : FALSE,
					'name'		=> $matches[5],
				);
				if( isset( $matches[6] ) )
					$param['default']	= $matches[7];
				$method['param'][$matches[5]] = $param; 
			}
		}
		if( $openBlocks )
		{
			$methodBlock	= array_pop( $openBlocks );
			$this->overwriteCodeDataWithDocData( $method, $methodBlock );
			$openBlocks	= array();
		}
		if( !$method['access'] )
			$method['access']	= "public";
		return $method;
	}
private function parseMethod( $matches, &$openBlocks )
	{
		$method	= $this->methodData;
		$method['name']		= $matches[5];
		$method['access']	= trim( $matches[3] );
		$method['abstract']	= (bool) $matches[1];
		$method['final']	= (bool) $matches[2];
		$method['static']	= (bool) $matches[4];
		if( trim( $matches[6] ) )
		{
			$paramList	= array();
			foreach( explode( ",", $matches[6] ) as $param )
			{
				$param	 = trim( $param );
				if( !preg_match( $this->regexParam, $param, $matches ) )
					continue;
				$param	= array(
					'cast'		=> $matches[2],
					'reference'	=> $matches[4] ? TRUE : FALSE,
					'name'		=> $matches[5],
				);
				if( isset( $matches[6] ) )
					$param['default']	= $matches[7];
				$method['param'][$matches[5]] = $param; 
			}
		}
		if( $openBlocks )
		{
			$methodBlock	= array_pop( $openBlocks );
			$this->overwriteCodeDataWithDocData( $method, $methodBlock );
			$openBlocks	= array();
		}
		if( !$method['access'] )
			$method['access']	= "public";
		return $method;
	}
private function parseMethod ( $ matches , & $ openBlocks ) { $ method = $ this -> methodData ; $ method [ 'name' ] = $ matches [ 5 ] ; $ method [ 'access' ] = trim ( $ matches [ 3 ] ) ; $ method [ 'abstract' ] = ( bool ) $ matches [ 1 ] ; $ method [ 'final' ] = ( bool ) $ matches [ 2 ] ; $ method [ 'static' ] = ( bool ) $ matches [ 4 ] ; if ( trim ( $ matches [ 6 ] ) ) { $ paramList = array ( ) ; foreach ( explode ( "," , $ matches [ 6 ] ) as $ param ) { $ param = trim ( $ param ) ; if ( ! preg_match ( $ this -> regexParam , $ param , $ matches ) ) continue ; $ param = array ( 'cast' => $ matches [ 2 ] , 'reference' => $ matches [ 4 ] ? TRUE : FALSE , 'name' => $ matches [ 5 ] , ) ; if ( isset ( $ matches [ 6 ] ) ) $ param [ 'default' ] = $ matches [ 7 ] ; $ method [ 'param' ] [ $ matches [ 5 ] ] = $ param ; } } if ( $ openBlocks ) { $ methodBlock = array_pop ( $ openBlocks ) ; $ this -> overwriteCodeDataWithDocData ( $ method , $ methodBlock ) ; $ openBlocks = array ( ) ; } if ( ! $ method [ 'access' ] ) $ method [ 'access' ] = "public" ; return $ method ; }
Parses a Method Signature and returns Array of collected Information.
@access		private
@param		array		$matches		Matches of RegEx
@param		array		$openBlocks		Doc Blocks opened before
@return		array
Parses a Method Signature and returns Array of collected Information .