public function setClippingPath($index = null) { if (null !== $index && array_key_exists($index, $this->clippingPaths)) { $this->curClippingPath = $index; } else { $this->curClippingPath = null; } return $this; }