コード例 #1
1
 /**
  * @since 0.13.0
  *
  * @param string $value
  *
  * @return self
  */
 public function setAlignment($value)
 {
     if (Jc::getValidator()->isValid($value)) {
         $this->alignment = $value;
     }
     return $this;
 }
コード例 #2
0
ファイル: NumberingLevel.php プロジェクト: doit05/relProject
 /**
  * @since 0.13.0
  *
  * @param string $value
  *
  * @return self
  */
 public function setAlignment($value)
 {
     if (Jc::getValidator()->isValid($value)) {
         $alignment = '';
         switch ($value) {
             case Jc::LEFT:
                 $alignment = Jc::START;
                 break;
             case Jc::RIGHT:
                 $alignment = Jc::END;
                 break;
             case Jc::JUSTIFY:
                 $alignment = Jc::BOTH;
                 break;
             default:
                 $alignment = $value;
                 break;
         }
         $this->alignment = $alignment;
     }
     return $this;
 }
コード例 #3
0
ファイル: Frame.php プロジェクト: brunodebarros/phpword
 /**
  * @since 0.13.0
  *
  * @param string $value
  *
  * @return self
  */
 public function setAlignment($value)
 {
     if (in_array($value, Jc::getAllowedValues(), true)) {
         $this->alignment = $value;
     }
     return $this;
 }