CakePdf\Pdf\CakePdf::orientation PHP Method

orientation() public method

Get/Set Orientation.
public orientation ( null | string $orientation = null ) : mixed
$orientation null | string orientation to set
return mixed
    public function orientation($orientation = null)
    {
        if ($orientation === null) {
            return $this->_orientation;
        }
        $this->_orientation = $orientation;
        return $this;
    }

Usage Example

Esempio n. 1
0
 /**
  *
  * @dataProvider provider
  */
 public function testConfigRead($config)
 {
     Configure::write('CakePdf', $config);
     $pdf = new CakePdf();
     $this->assertEquals($config['margin'], $pdf->margin());
     $this->assertEquals($config['orientation'], $pdf->orientation());
 }