Return the methods in this class.

@param bool regularOnly Do not return constructors and destructors
@return MethodDoc[]
969824
function &methods($regularOnly = FALSE)
    {
        if ($regularOnly) {
            $return = array();
            foreach ($this->_methods as $method) {
                if (!$method->isConstructor() && !$method->isDestructor()) {
                    $return[] = $method;
                }
            }
        } else {
            $return = $this->_methods;
        }

        return $return;
    }
926720
public static function methods()
    {
        if (!is_array(self::$methods)) {
            self::$methods = [];
            $interfaces = class_implements('Toplan\\PhpSms\\ParasiticAgent');
            foreach ($interfaces as $interface) {
                self::$methods = array_merge(self::$methods, get_class_methods($interface));
            }
        }

        return self::$methods;
    }
777126
public function getFunctions()
    {
        return [
            new ExpressionFunction('link', static function ($object, $rel, $absolute = false) {
                    return sprintf('$container->get(\'hateoas.helper.link\')->getLinkHref(%s, %s, %s)', $object, $rel, $absolute);
            }, static function ($context, $object, $rel, $absolute = false) {
                return $context['container']->get('hateoas.helper.link')->getLinkHref($object, $rel, $absolute);
            }),
        ];
    }
1228088
public function getMethods( $withMagics = TRUE )
	{
		if( $withMagics )
			return $this->methods;
		else
		{
			$methods	= array();
			foreach( $this->methods as $method )
				if( substr( $method->getName(), 0, 2 ) !== "__" )
					$methods[$method->getName()]	= $method;
			return $methods;
		}
	}
1217967
protected static function _generateMethodStubs($methods, $defaults = true)
    {
        $result = [];
        $methods = $methods !== null ? (array) $methods : [];

        if ($defaults) {
            $methods = array_merge($methods, array_keys(static::_getMagicMethods()));
        }
        $methods = array_unique($methods);

        $magicMethods = static::_getMagicMethods();

        foreach ($methods as $name) {
            if (isset($magicMethods[$name])) {
                $result[$name] = $magicMethods[$name];
            } else {
                $static = $return = '';
                if ($name[0] === '&') {
                    $return = '$r = null; return $r;';
                }
                if (preg_match('/^&?::.*/', $name)) {
                    $static = 'static ';
                    $name = substr($name, 2);
                }
                $result[$name] = "public {$static}function {$name}() {{$return}}";
            }
        }

        return $result;
    }
1195938
public function getMethods()
    {
        $aMethods = [];
        foreach($this->reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $xMethod)
        {
            $sMethodName = $xMethod->getShortName();
            // Don't take magic __call, __construct, __destruct methods
            if(strlen($sMethodName) > 2 && substr($sMethodName, 0, 2) == '__')
            {
                continue;
            }
            // Don't take excluded methods
            if(in_array($sMethodName, $this->aProtectedMethods))
            {
                continue;
            }
            $aMethods[] = $sMethodName;
        }
        return $aMethods;
    }
1299624
public function getMethods()
    {
        //todo cache
        $result = array();
        foreach ($this->getReflectionClass()->getMethods() as $m)
        {
            $result[] = MethodInfo::__internal_create($this, $m);
        }
        return $result;
    }
1271912
public function normalize(MethodDoc $method) : array
    {
        return [
            'allOf' => array_merge(
                [
                    $this->shapeNormalizer->getResponseShapeDefinition(),
                    [
                        'type' => 'object',
                        'properties' => ['result' => $this->getMethodResultArrayDoc($method)],
                    ],
                ],
                array_map(
                    function ($errorIdentifier) {
                        return [
                            'type' => 'object',
                            'properties' => [
                                'error' => [
                                    '$ref' => $this->definitionRefResolver->getDefinitionRef(
                                        $this->definitionRefResolver->getErrorDefinitionId(
                                            new ErrorDoc('', 0, null, null, $errorIdentifier),
                                            DefinitionRefResolver::CUSTOM_ERROR_DEFINITION_TYPE
                                        )
                                    )
                                ]
                            ],
                        ];
                    },
                    $method->getGlobalErrorRefList()
                ),
                [
                    [
                        'type' => 'object',
                        'properties' => [
                            'error' => ['$ref' => $this->definitionRefResolver->getDefinitionRef('Default-Error')]
                        ],
                    ]
                ]
            )
        ];
    }
972817
public function normalize(MethodDoc $method) : array
    {
        if (null !== $method->getResultDoc()) {
            return [
                '$ref' => $this->definitionRefResolver->getDefinitionRef(
                    $this->definitionRefResolver->getMethodDefinitionId(
                        $method,
                        DefinitionRefResolver::METHOD_RESULT_DEFINITION_TYPE
                    )
                )
            ];
        }

        return ['description' => 'Method result'];
    }
1023125
public function getAllMethodAnnotations()
    {
        $data = [];
        $methods = self::listMethodsFromClass($this->className);
        $this->annotationObject->mergeMethodList($methods);
        foreach ($methods as $method) {
            $annotations = self::getMethodAnnotations($method->name);
            if (!empty($annotations)) {
                $data[$method->name] = $annotations;
            }
        }

        $this->annotationObject->mergeMethodAnnotations($data);

    }
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;
    }
378579
protected function getMethodExternalSchemaList(MethodDoc $method) : array
    {
        $list = [];
        // Create request params schema if provided
        if (null !== $method->getParamsDoc()) {
            $key = $this->definitionRefResolver->getMethodDefinitionId(
                $method,
                DefinitionRefResolver::METHOD_PARAMS_DEFINITION_TYPE
            );
            $list[$key] = $this->typeDocNormalizer->normalize($method->getParamsDoc());
        }

        // Create custom result schema if provided
        if (null !== $method->getResultDoc()) {
            $key = $this->definitionRefResolver->getMethodDefinitionId(
                $method,
                DefinitionRefResolver::METHOD_RESULT_DEFINITION_TYPE
            );
            $list[$key] = $this->typeDocNormalizer->normalize($method->getResultDoc());
        }

        return $list;
    }
989572
public JMethod []getDeclaredMethods()
  {
    SoftReference<JMethod[]> jMethodsRef = _declaredMethodsRef;
    JMethod []jMethods = null;

    if (jMethodsRef != null) {
      jMethods = jMethodsRef.get();
      if (jMethods != null)
        return jMethods;
    }

    Method []methods = _class.getDeclaredMethods();
    
    jMethods = new JMethod[methods.length];

    for (int i = 0; i < methods.length; i++) {
      jMethods[i] = new JMethodWrapper(methods[i], getClassLoader());
    }

    _declaredMethodsRef = new SoftReference<JMethod[]>(jMethods);

    return jMethods;
  }
1173965
public static Method[] getDeclaredMethods(Class clazz) {
	Method[] methods = clazz.getMethods();
	ArrayList list = new ArrayList();
	for (int i = 0; i < methods.length; i++) {
	    if (methods[i].getDeclaringClass() == clazz) list.add(methods[i]);
	}
	if (list.size() == 0) return new Method[0];
	return (Method[]) list.toArray(new Method[list.size()]);
    }
936369
protected function getMethods($showAll, \Reflector $reflector, $noInherit = false)
    {
        $className = $reflector->getName();

        $methods = [];
        foreach ($reflector->getMethods() as $name => $method) {
            if ($noInherit && $method->getDeclaringClass()->getName() !== $className) {
                continue;
            }

            if ($showAll || $method->isPublic()) {
                $methods[$method->getName()] = $method;
            }
        }

        \ksort($methods, SORT_NATURAL | SORT_FLAG_CASE);

        return $methods;
    }
720819
public function getExcludedMethods()
    {
        $excludedMethods = [];

        foreach ($this->methods as $excludedMethod) {
            $classAndMethod = explode('::', $excludedMethod->getName());
            $className = $classAndMethod[0];
            $methodName = $classAndMethod[1];

            $excludedMethods[$className][] = $methodName;
        }

        return $excludedMethods;
    }
293185
protected function getInterfaceMethods()
    {
        $methods = array();

        foreach ($this->interfaces as $interface) {
            $ref = new \ReflectionClass($interface);
            $methods = array_merge($methods, $ref->getMethods());
        }

        return $methods;
    }