Get the method's signatures

@param bool $compact (default) Compact signatures in a format compatible with system.methodSignature

@return array
343873
public function getSignatures($compact = true) {

        if ( $compact ) {

            $signatures = [];

            foreach ( $this->signatures as $signature ) {

                $signatures[] = array_merge([$signature["RETURNTYPE"]], array_values($signature["PARAMETERS"]));

            }

            return $signatures;

        } else {

            return $this->signatures;

        }

    }
1000870
public function getIdentifiers($with_current = false)
    {
        $identifiers = [];
        foreach ($this->resources as $name => $resource) {
            if (!(!$with_current && $name === $this->config->getResourceName())) {
                /** @noinspection PhpUndefinedMethodInspection */
                $identifiers[$name . 'Id'] = $resource->getId();
            }
        }
        return $identifiers;
    }
919541
public function getSingleCommit(string $sha): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/commits/:sha',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $sha));
    }
361886
public function getProperties($modified = false)
    {
        $result = array();

        if($row = $this->getIterator()->current()) {
            $result = $row->getProperties($modified);
        }

        return $result;
    }
980711
function getSignature(array $params, $method = null)
    {
        ksort($params);
        unset($params['sign']);
        unset($params['signature']);
        array_push($params, $this->secretKey);

        if ($method) {
            array_unshift($params, $method);
        }

        return hash('sha256', join('{up}', $params));
    }
843751
private function get_signature_method(&$request) {
    $signature_method =
        @$request->get_parameter("oauth_signature_method");
    if (!$signature_method) {
      $signature_method = "PLAINTEXT";
    }
    if (!in_array($signature_method,
                  array_keys($this->signature_methods))) {
      throw new OAuthException(
        "Signature method '$signature_method' not supported " .
        "try one of the following: " .
        implode(", ", array_keys($this->signature_methods))
      );
    }
    return $this->signature_methods[$signature_method];
  }
604865
def get_signatures(self):
        
        signatures = self.request_list('GetSignatures')

        return [zobjects.Signature.from_dict(i) for i in signatures]
1158458
public function getProperties($modified = false)
    {
        $properties = $this->_data;

        if ($modified) {
            $properties = array_intersect_key($properties, $this->__modified_properties);
        }

        return $properties;
    }
564541
public function get_method($identifier)
    {
    	$key = $this->_key($identifier);
    	$item = $this->get($key);

    	return ($item == false) ?
    		array('status' => false, 'data' => null) :
    		array('status' => true, 'data' => $item);
    }
387435
private static function getSignatures($header, $scheme)
    {
        $signatures = [];
        $items = explode(",", $header);

        foreach ($items as $item) {
            $itemParts = explode("=", $item, 2);
            if ($itemParts[0] == $scheme) {
                array_push($signatures, $itemParts[1]);
            }
        }

        return $signatures;
    }
1121090
def get_signatures(self):
        
        signature_expr = re.compile(r"^(META-INF/)(.*)(\.RSA|\.EC|\.DSA)$")
        signature_datas = []

        for i in self.get_files():
            if signature_expr.search(i):
                signature_datas.append(self.get_file(i))

        return signature_datas
889699
public function getMethods($filter = null)
    {
        if (!isset($this->methods)) {
            $directMethods = ReflectionMethod::collectFromClassNode($this->classLikeNode, $this);
            $parentMethods = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance, $isParent) {
                $reflectionMethods = [];
                foreach ($instance->getMethods() as $reflectionMethod) {
                    if (!$isParent || !$reflectionMethod->isPrivate()) {
                        $reflectionMethods[$reflectionMethod->name] = $reflectionMethod;
                    }
                }
                $result += $reflectionMethods;
            });
            $methods = $directMethods + $parentMethods;

            $this->methods = $methods;
        }
        if (!isset($filter)) {
            return array_values($this->methods);
        }

        $methods = [];
        foreach ($this->methods as $method) {
            if (!($filter & $method->getModifiers())) {
                continue;
            }
            $methods[] = $method;
        }

        return $methods;
    }
308923
private function getSignableParameters()
    {
        // Grab all parameters
        $params = $this->request->getUri()->getQuery() . '&' . $this->request->getBody()->__toString();
        $params = Util::parseParameters($params);

        // Remove oauth_signature if present
        // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")
        if (isset($params['oauth_signature'])) {
            unset($params['oauth_signature']);
        }

        $params = array_merge($params, $this->additionalParams);

        return Util::buildHttpQuery($params);
    }
549303
public static function signatureArray(): array
    {
        $numberOfIncludedFiles = count(get_included_files());
        $serverIP = static::ip();
        $domain = Application::getDomain();

        $signature = [];

        // add the server IP and domain
        $signature[] = "server: {$serverIP} ({$domain})";

        if (PHP_SAPI != 'cli') {
            // this is regular HTTP request
            $method = Request::method();
            $url = Application::getCurrentURL();

            // add info about the current request
            $signature[] = "URL: {$method}={$url}";

            // some end user IP and host stuff
            $endUserIp = Request::ip();
            $endUserHost = Request::host() ?? 'no host detected';
            $proxy = '';

            if ($endUserIp == $endUserHost) {
                $endUserHost = 'no host detected';
            }

            if (Request::hasProxy()) {
                $proxySignature = Request::proxySignature();
                $forwardedFor = Request::httpXForwardedFor();
                $proxy = " via {$proxySignature} for {$forwardedFor}";
            }

            $signature[] = "Origin: {$endUserIp} ({$endUserHost}){$proxy}";

            $uas = Request::userAgent() ?? 'no user agent set';
            $signature[] = "UAS: {$uas}";
        } else {
            $cliName = Application::getCliName();
            $cliScript = Application::getCliScriptPath();

            $signature[] = "CLI Name: {$cliName}";
            $signature[] = "CLI Script: {$cliScript}";

            $params = Cli::getParameters();
            if (count($params) > 0) {
                $signature[] = 'CLI Params: ' . print_r($params, true);
            }
        }

        $serverLoad = static::getServerLoad();
        $signature[] = "Server Load: {$serverLoad}";

        $memory = memory_get_usage();
        $peak = memory_get_peak_usage();
        $allocatedMemory = memory_get_peak_usage(true);
        $memoryLimit = ini_get('memory_limit') ?? -1;

        $memoryKb = round($memory / 1024, 2);
        $peakKb = round($peak / 1024, 2);
        $allocatedMemoryKb = round($allocatedMemory / 1024, 2);

        $limit = '';
        $peakSpent = '';

        if ($memoryLimit > 0) {
            $limitInt = Convert::stringToBytes($memoryLimit);
            $limit = ", limit: {$memoryLimit}";

            $spent = round($peak / $limitInt * 100, 2);
            $peakSpent = " ({$spent}% of limit)";
        }

        $signature[] = "Memory: current: {$memoryKb}kb, peak: {$peakKb}kb{$peakSpent}, allocated: {$allocatedMemoryKb}kb{$limit}";
        $signature[] = "No. of included files: {$numberOfIncludedFiles}";

        return $signature;
    }
119223
public function get_signable_parameters() {/*{{{*/
    // Grab all parameters
    $params = $this->parameters;

    // Remove oauth_signature if present
    if (isset($params['oauth_signature'])) {
      unset($params['oauth_signature']);
    }

    // Urlencode both keys and values
    $keys = OAuthUtil::urlencode_rfc3986(array_keys($params));
    $values = OAuthUtil::urlencode_rfc3986(array_values($params));
    $params = array_combine($keys, $values);

    // Sort by keys (natsort)
    uksort($params, 'strcmp');

    // Generate key=value pairs
    $pairs = array();
    foreach ($params as $key=>$value ) {
      if (is_array($value)) {
        // If the value is an array, it's because there are multiple
        // with the same key, sort them, then add all the pairs
        natsort($value);
        foreach ($value as $v2) {
          $pairs[] = $key . '=' . $v2;
        }
      } else {
        $pairs[] = $key . '=' . $value;
      }
    }

    // Return the pairs, concated with &
    return implode('&', $pairs);
  }
583636
private function getMethods(): array
    {
        $tests = [];
        $methods = $this->refl->getMethods(\ReflectionMethod::IS_PUBLIC);
        foreach ($methods as $method) {
            $hasTestName = preg_match(self::$testName, $method->getName());
            $docComment = $method->getDocComment();
            $hasTestAnnotation = false !== $docComment && preg_match(self::$testAnnotation, $docComment);
            $isTestMethod = $hasTestName || $hasTestAnnotation;
            if ($isTestMethod) {
                $tests[] = new ParsedFunction((string) $method->getDocComment(), 'public', $method->getName());
            }
        }

        return $tests;
    }
141675
public function collectExpectedExportIgnores()
    {
        $expectedExportIgnores = [];

        $initialWorkingDirectory = (string) getcwd();

        chdir($this->directory);

        $ignoredGlobMatches = array_merge(
            $this->ignoredGlobMatches,
            $this->getGitignoredPatterns()
        );

        foreach (glob($this->globPattern, GLOB_BRACE) as $filename) {
            if (!in_array($filename, $ignoredGlobMatches)) {
                if (is_dir($filename)) {
                    $expectedExportIgnores[] = $filename . '/';
                    continue;
                }
                $expectedExportIgnores[] = $filename;
            }
        }

        chdir($initialWorkingDirectory);

        if ($this->hasGitattributesFile()) {
            $expectedExportIgnores = array_merge(
                $expectedExportIgnores,
                $this->getPresentExportIgnoresToPreserve($expectedExportIgnores)
            );
        }

        sort($expectedExportIgnores, SORT_STRING | SORT_FLAG_CASE);

        if ($this->isKeepLicenseEnabled()) {
            $licenseLessExpectedExportIgnores = [];
            array_filter($expectedExportIgnores, function ($exportIgnore) use (
                &$licenseLessExpectedExportIgnores
            ) {
                if (!preg_match('/(License.*)/i', $exportIgnore)) {
                    $licenseLessExpectedExportIgnores[] = $exportIgnore;
                }
            });

            $expectedExportIgnores = $licenseLessExpectedExportIgnores;
        }

        return array_unique($expectedExportIgnores);
    }