object PM
Play provides you a Map[String, Seq[String]]
(aliased as UrlFormEncoded
) in request body for urlFormEncoded requests.
It's generally a lot more convenient to work on Map[Path, Seq[String]]
to define Rules.
This object contains methods used to convert Map[String, Seq[String]]
<-> Map[Path, Seq[String]]
- Note
We use the alias
UrlFormEncoded
, which is just aMap[String, Seq[String]]
- Alphabetic
- By Inheritance
- PM
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- type PM = Map[Path, String]
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asKey(p: Path): String
Convert a Path to a String key
Convert a Path to a String key
- p
The path to convert
- returns
A String representation of
p
-
def
asPath(k: String): Path
Convert a String key to a Path using
PathParser
Convert a String key to a Path using
PathParser
- k
The String representation of path to convert
- returns
a
Path
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
find(path: Path)(data: PM): PM
Find a sub-Map of all the elements at a Path starting with
path
Find a sub-Map of all the elements at a Path starting with
path
- path
The prefix to look for
- data
The map in which you want to lookup
- returns
a sub Map. If no key of
data
starts withpath
, this map will be empty
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
repath(m: UrlFormEncoded, f: (Path) ⇒ Path): UrlFormEncoded
Apply
f
to all the keys ofm
-
def
repathPM(m: PM, f: (Path) ⇒ Path): PM
Apply
f
to all the keys ofm
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toM(m: PM): UrlFormEncoded
Convert a Map[Path, Seq[String]] to a Map[String, Seq[String]]
-
def
toPM(m: UrlFormEncoded): PM
Convert a Map[String, Seq[String]] to a Map[Path, Seq[String]]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
object
PathParser
extends RegexParsers
A parser converting a key of a Map[String, [Seq[String]]] to a Path instance
foo.bar[0].baz
becomesPath \ "foo" \ "bar" \ 0 \ "baz"