all() public static method

Returns all possible alignments.
public static all ( ) : int[]
return int[] A list of valid alignment constants.
コード例 #1
0
ファイル: TableStyle.php プロジェクト: webmozart/console
 /**
  * Returns the default column alignment.
  *
  * @param int $alignment One of the {@link Alignment} constants.
  *
  * @return static The current instance.
  */
 public function setDefaultColumnAlignment($alignment)
 {
     Assert::oneOf($alignment, Alignment::all(), 'The default column alignment must be one of the Alignment constants. Got: %s');
     $this->defaultColumnAlignment = $alignment;
     return $this;
 }
コード例 #2
0
ファイル: GridStyle.php プロジェクト: webmozart/console
 /**
  * Sets the cell alignment.
  *
  * @param int $alignment One of the {@link Alignment} constants.
  *
  * @return static The current instance.
  */
 public function setCellAlignment($alignment)
 {
     Assert::oneOf($alignment, Alignment::all(), 'The cell alignment must be one of the Alignment constants. Got: %s');
     $this->cellAlignment = $alignment;
     return $this;
 }