예제 #1
0
파일: Hal.php 프로젝트: BWorld/hal-1
 /**
  * Return the current object in a application/hal+json format (links and
  * resources).
  *
  * @param bool $pretty
  *   Enable pretty-printing.
  * @return string
  */
 public function asJson($pretty = false)
 {
     $renderer = new HalJsonRenderer();
     return $renderer->render($this, $pretty);
 }
예제 #2
0
파일: Hal.php 프로젝트: solvire/hal
 /**
  * Return the current object in a application/hal+json format (links and
  * resources).
  *
  * @param bool $pretty
  *   Enable pretty-printing.
  * @param bool $encode
  *   Run through json_encode
  * @return string
  */
 public function asJson($pretty = false, $encode = true)
 {
     $renderer = new HalJsonRenderer();
     return $renderer->render($this, $pretty, $encode);
 }