/** * @param FunctionInterface $method * Any method * * @param FullyQualifiedFunctionName $fqsen * The FQSEN for the method * * @return null */ private function addMethodWithFunctionFQSEN(FunctionInterface $method, FullyQualifiedFunctionName $fqsen) { $this->addMethodWithScopeAndName($method, $fqsen->getNamespace(), $fqsen->getNameWithAlternateId()); }
/** * @param FullyQualifiedFunctionName * The FQSEN of a function we'd like to look up * * @return bool * If the FQSEN represents an internal function that * hasn't been loaded yet, true is returned. */ private function hasInternalFunctionWithFQSEN(FullyQualifiedFunctionName $fqsen) : bool { // Only root namespaced functions will be found in // the internal function map. if ($fqsen->getNamespace() != '\\') { return false; } // For elements in the root namespace, check to see if // there's a static method signature for something that // hasn't been loaded into memory yet and create a // method out of it as its requested $function_signature_map = UnionType::internalFunctionSignatureMap(); if (!empty($function_signature_map[$fqsen->getNameWithAlternateId()])) { $signature = $function_signature_map[$fqsen->getNameWithAlternateId()]; // Add each method returned for the signature foreach (FunctionFactory::functionListFromSignature($this, $fqsen, $signature) as $i => $function) { $this->addFunction($function); } return true; } return false; }