Dibi\Result::setFormat PHP 메소드

setFormat() 최종 공개 메소드

Sets data format.
final public setFormat ( $type, $format ) : self
리턴 self
    public final function setFormat($type, $format)
    {
        $this->formats[$type] = $format;
        return $this;
    }

Usage Example

예제 #1
0
 /**
  * Result set factory.
  * @param  ResultDriver
  * @return Result
  */
 public function createResultSet(ResultDriver $resultDriver)
 {
     $res = new Result($resultDriver);
     return $res->setFormat(Type::DATE, $this->config['result']['formatDate'])->setFormat(Type::DATETIME, $this->config['result']['formatDateTime']);
 }