Returns the "return" fully qualified class name from the code passed in parameter.

@param string $code
@param bool $selfEdit
@throws Exception
@return string
340217
public static function getReturnTypeFromCode($code, $selfEdit) {
		$url = MoufReflectionProxy::getLocalUrlToProject()."src/direct/return_type_from_code.php";

	
		$response = self::performRequest($url,
		[
			"selfedit"=>($selfEdit)?"true":"false",
			"code" => $code
		]);
	
		$obj = @unserialize($response);
	
		if ($obj === false) {
			throw new Exception($response);
		}
	
		return $obj["data"]["class"];
	}
97085
public static function GetNameForCode($code, $args = null, $_ = null)
  {
    if (!array_key_exists($code, static::$errors_arr)) {
      return false;
    }

    $str = static::$errors_arr[$code];

    if (!is_null($args)) {
      if (!is_array($args)) {
        $args = array_slice(func_get_args(), 1);
      }

      array_unshift($args, $str);

      return call_user_func_array('sprintf', $args);
    }

    return $str;
  }
461810
public static function GetCodeName( $code ) : string
   {

      switch ( $code )
      {

         case \E_ERROR:
         case \E_USER_ERROR:
            return 'ERROR';

         case \E_WARNING:
         case \E_USER_WARNING:
            return 'WARNING';

         case \E_DEPRECATED:
         case \E_USER_DEPRECATED:
            return 'DEPRECATED';

         case \E_NOTICE:
         case \E_USER_NOTICE:
            return 'NOTICE';

         case \E_PARSE:
            return 'PARSE';
         case \E_RECOVERABLE_ERROR:
            return 'RECOVERABLE ERROR';

         case \E_STRICT:
            return 'STRICT';

         default:
            if ( \is_string( $code ) )
            {
               return $code;
            }
            return 'OTHER';

      }

   }
700390
public function deleteInstance($selfedit = "false", $instanceName=null, $returnurl = null) {
        $this->selfedit = $selfedit;

        if ($selfedit == "true") {
            $this->moufManager = MoufManager::getMoufManager();
        } else {
            $this->moufManager = MoufManager::getMoufManagerHiddenInstance();
        }

        $this->moufManager->removeComponent($instanceName);
        $this->moufManager->rewriteMouf();

        if ($returnurl) {
            header("Location:".$returnurl);
        } else {
            header("Location: .?selfedit=".$selfedit);
        }
    }
1004104
function delExpect($error_code)
    {
        $deleted = false;
        if ((is_array($error_code) && (0 != count($error_code)))) {
            // $error_code is a non-empty array here; we walk through it trying
            // to unset all values
            foreach ($error_code as $key => $error) {
                $deleted =  $this->_checkDelExpect($error) ? true : false;
            }

            return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
        } elseif (!empty($error_code)) {
            // $error_code comes alone, trying to unset it
            if ($this->_checkDelExpect($error_code)) {
                return true;
            }

            return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
        }

        // $error_code is empty
        return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME
    }
907174
public function getMethodId($context_self = null)
    {
        if ($this->function instanceof ClassMethod) {
            $function_name = (string)$this->function->name;

            return ($context_self ?: $this->source->getFQCLN()) . '::' . strtolower($function_name);
        }

        if ($this->function instanceof Function_) {
            $namespace = $this->source->getNamespace();

            return ($namespace ? strtolower($namespace) . '\\' : '') . strtolower($this->function->name->name);
        }

        return $this->getFilePath()
            . ':' . $this->function->getLine()
            . ':' . (int)$this->function->getAttribute('startFilePos')
            . ':-:closure';
    }
992280
public function getRedirectUrl($selfEdit) {
		if ($selfEdit) {
			$rootUrl = ROOT_URL; 
		} else {
			$rootUrl = ROOT_URL.'../../../';
		}
		
		return "src/direct/install_file.php?selfedit=".json_encode($selfEdit)."&root_url=".urlencode($rootUrl)."&install_package=".$this->getPackage()->getName()."&install_file=".$this->getFile();
	}
432075
public static function getCodeName( $typeCode )
	{
		// Maybe this should be: XmlTypeCode::$codeToTypeMap[ $typeCode ];
		$oClass = new \ReflectionClass( __CLASS__ );
		foreach ( $oClass->getConstants() as $key => $value )
		{
			if ( $value == $typeCode ) return $key;
		}

		return false;
	}
909426
public function getResult($checkCode = true)
    {
        if (null === $this->result) {
            // for symfony/process:^4.2
            if (method_exists(Process::class, 'fromShellCommandline')) {
                $process = Process::fromShellCommandline($this->command, $this->cwd);
            } else {
                $process = new Process($this->command, $this->cwd);
            }
            $process->run();

            $this->result = new CliResult(
                $process->getExitCode(),
                $process->getOutput(),
                $process->getErrorOutput()
            );
        }

        if ($checkCode && 0 !== $this->result->getCode()) {
            throw new ExecutionException(
                $this->result,
                sprintf(
                    "Cannot execute `%s`:\nCode: %s\nExit text: %s\nError output: %s\nDetails:\n%s",
                    $this->command,
                    $this->result->getCode(),
                    isset(Process::$exitCodes[$this->result->getCode()]) ? Process::$exitCodes[$this->result->getCode()] : 'Unknown exit code',
                    $this->result->getError(),
                    $this->result->getOutput()
                ),
                $process->getExitCode()
            );
        }

        return $this->result;
    }
665265
public function getRedirectUrl($selfEdit) {
		$url = $this->getUrl();
		if (strpos($url, "?") !== false) {
			$url .= "&selfedit=".($selfEdit?"true":"false");
		} else {
			$url .= "?selfedit=".($selfEdit?"true":"false");
		}
		return $url;
	}
63086
public function exceptionEditAction($code)
    {
        $cms = $this->getCmsManager();

        if (!$this->getExceptionListener()->hasErrorCode($code)) {
            throw new InternalErrorException(sprintf('The error code "%s" is not set in the configuration', $code));
        }

        try {
            $page = $this->getExceptionListener()->getErrorCodePage($code);
        } catch (PageNotFoundException $e) {
            throw new InternalErrorException('The requested error page does not exist, please run the sonata:page:update-core-routes command', null, $e);
        }

        $cms->setCurrentPage($page);

        // NEXT_MAJOR: remove the usage of $this->getRequestObject() by injecting the request action method in 4.0 (BC break)
        return $this->getPageServiceManager()->execute($page, $this->getRequestObject());
    }
496502
public static function getClass($className, $selfEdit) {
		$url = MoufReflectionProxy::getLocalUrlToProject()."src/direct/get_class.php?class=".$className."&selfedit=".(($selfEdit)?"true":"false");

		$response = self::performRequest($url);
		
		return new MoufXmlReflectionClass($response);
	}
63363
public function detailByCode(string $code)
    {
        $all = $this->detail($code);

        return $this->checkAndReturnSingleResult($all);
    }
563745
public function newInstanceByCallback($selfedit = "false", $instanceName=null) {
        $this->instanceName = $instanceName;
        $this->selfedit = $selfedit;

        $this->contentBlock->addFile(dirname(__FILE__)."/../../views/instances/newInstanceByCallback.php", $this);
        $this->template->toHtml();
    }
164280
public static function getName(CountryCode $code)
    {
        $codeValue = $code->toNative();
        $name      = self::$names[$codeValue];

        return new StringLiteral($name);
    }
407284
protected function getCode($code)
    {
        if (is_array($code)) {
            return $this->getCodeArray($code);
        }

        return $this->get($code);
    }
1271407
public static function __(string $code) : string
    {
        $t = self::getInstance();
        if (!isset($t->translations[$code])) {
            return $code;
        }
        return $t->translations[$code];
    }