private function hydrateDefinitionMethodCalls(Definition $definition, array &$definitionArray)
    {
        foreach ($definition->getMethodCalls() as $methodToCall) {
            $method_call_array = [];

            // retrieving method to call name
            $method_name = array_shift($methodToCall);
            $method_call_array[] = $method_name;

            // retrieving method to call arguments
            $methodArgs = [];
            foreach (array_shift($methodToCall) as $arg) {
                $methodArgs[] = $this->convertArgument($arg);
            }

            $method_call_array[] = $methodArgs;

            // finally add method call to definition array
            $definitionArray['calls'][] = $method_call_array;
        }
    }
private function hydrateDefinitionMethodCalls(Definition $definition, array &$definitionArray)
    {
        foreach ($definition->getMethodCalls() as $methodToCall) {
            $method_call_array = [];

            // retrieving method to call name
            $method_name = array_shift($methodToCall);
            $method_call_array[] = $method_name;

            // retrieving method to call arguments
            $methodArgs = [];
            foreach (array_shift($methodToCall) as $arg) {
                $methodArgs[] = $this->convertArgument($arg);
            }

            $method_call_array[] = $methodArgs;

            // finally add method call to definition array
            $definitionArray['calls'][] = $method_call_array;
        }
    }
private function hydrateDefinitionMethodCalls ( Definition $ definition , array & $ definitionArray ) { foreach ( $ definition -> getMethodCalls ( ) as $ methodToCall ) { $ method_call_array = [ ] ; // retrieving method to call name $ method_name = array_shift ( $ methodToCall ) ; $ method_call_array [ ] = $ method_name ; // retrieving method to call arguments $ methodArgs = [ ] ; foreach ( array_shift ( $ methodToCall ) as $ arg ) { $ methodArgs [ ] = $ this -> convertArgument ( $ arg ) ; } $ method_call_array [ ] = $ methodArgs ; // finally add method call to definition array $ definitionArray [ 'calls' ] [ ] = $ method_call_array ; } }
Hydrate definition array method calls with definition entity.

@param Definition $definition       the definition to convert
@param array      $definitionArray the definition array (passed by reference)
Hydrate definition array method calls with definition entity .