Maps a POST request to a callable.

@param string $path Matched route path
@param callable $callback Callback that returns the response when matched
@return Route
348514
public function post( $path, callable $callback ) {
        $route = new Route( 'POST', $path, $callback );
        $this->_routes[] = $route;
        return $route;
    }
1110130
public function map(callable $callback = null)
	{
		return $callback ? array_map($callback, $this->list) : $this->list;
	}
1154666
public function addRoute($method, $route, $callback)
    {
        return $this->routes[] = new Route(strtoupper($method), $route, $callback);
    }
508011
private function mapRoute(string $pattern, callable $callback)
    {
        $word = self::getPattern($pattern);

        $pattern = '/^' . str_replace('/', '\/', $word) . '$/';
        $this->routes[$pattern] = $callback;
    }
1246087
def post(self, route: str(), callback: object()):
        
        self.__set_route('post', {route: callback})
        return RouteMapping
5602
public function uasort($callback, $path = '/')
    {
        $value = $this->get($path);
        if (null === $value || !is_array($value)) {
            return;
        }

        uasort($value, $callback);

        $this->set($path, $value);
    }
1219251
public function map($callback)
    {
        if (!is_callable($callback)) {
            throw new InvalidArgumentException('Callback has to be a valid callable, '.gettype($callback).' given.');
        }

        for ($i = 0; $this->checkIfLineNumberIsValid($i, false); $i++) {
            $this->setCurrentLineNumber($i);
            call_user_func($callback, $this->getLine($i), $i, $this);
        }
    }
1362194
public function all(string $path, callable $callback, int $priority = 0)
    {
        return $this->route('all', $path, $callback, $priority);
    }
999004
public function patch(string $url, $callback): Route
    {
        $route = new Route(['PATCH'], $url, $callback);
        $this->addRoute($route);

        return $route;
    }
1082519
public function patch( $path, callable $callback ) {
        $route = new Route( 'PATCH', $path, $callback );
        $this->_routes[] = $route;
        return $route;
    }
1047029
public function register(
        $path,
        $callback,
        $handle = null,
        array $requirements = [],
        array $options = [],
        $host = '',
        $schemes = [],
        $methods = [],
        $condition = null)
    {
        $route = new Route($this->normalizePath($path), [], $requirements, $options, $host, $schemes, $methods, $condition);
        $route->setAction($callback);
        if ($handle) {
            $route->setCustomName($handle);
        }
        $this->addRoute($route);

        return $route;
    }
1080854
public function get($path, callable $handler): RouterInterface
    {
        $ruler = $this->createRuler('GET', $path);
        return $this->addRuler($ruler, $handler);
    }
1056273
public static function post($url, $callback)
    {
        $route = new self($url);
        $route->setClosure($callback);
        $route->setMethod('post');

        $route->add();

        return $route;
    }
1008075
public function map($method, $path, $handler)
    {
        $path = sprintf('/%s', ltrim($path, '/'));

        $route = (new Route)->setMethods((array) $method)
        ->setPath($path)->setCallable($handler);

        $this->routes[$path] = $route;

        return $route;
    }
619037
public function map(callable $callback) {
        $handle = opendir($this->fullName);
        while (false !== ($name = readdir($handle))) {
            if ($name == '.' || $name == '..') {
                continue;
            }
            $file = $this->fullName.'/'.$name;
            $result = call_user_func($callback,
                is_dir($file) ? new static($file) : new File($file));
            if ($result === false) {
                break;
            }
        }
    }
351064
public function get(string $pattern, callable $callback)
    {
        if ($this->requestMethod === "GET") {
            $this->mapRoute($pattern, $callback);
        }
    }
325209
public function option($path, callable $handler): RouterInterface
    {
        $ruler = $this->createRuler('OPTION', $path);
        return $this->addRuler($ruler, $handler);
    }