__construct() public method

public __construct ( )
コード例 #1
0
 /**
  * Create a new RowDimension
  *
  * @param int $pIndex Numeric row index
  */
 public function __construct($pIndex = 0)
 {
     // Initialise values
     $this->rowIndex = $pIndex;
     // set dimension as unformatted by default
     parent::__construct(null);
 }
コード例 #2
0
 /**
  * Create a new ColumnDimension
  *
  * @param string $pIndex Character column index
  */
 public function __construct($pIndex = 'A')
 {
     // Initialise values
     $this->columnIndex = $pIndex;
     // set dimension as unformatted by default
     parent::__construct(0);
 }
コード例 #3
0
ファイル: Time.php プロジェクト: ju1ius/css-parser
 public function __construct($value, $unit)
 {
     if (!in_array($unit, self::$UNITS)) {
         throw new \InvalidArgumentException(sprintf("%s is not a valid Css Time unit", $unit));
     }
     parent::__construct($value, $unit);
 }
コード例 #4
0
ファイル: Account.php プロジェクト: byrokrat/accounting
 /**
  * Load account values at construct
  *
  * @param string $number      Numerical string identifying account
  * @param string $description Free text description of account
  * @param array  $attributes  Optional list of attributes
  */
 public function __construct(string $number, string $description = '', array $attributes = [])
 {
     if (!is_numeric($number)) {
         throw new Exception\RuntimeException('Account number must be a numeric string');
     }
     parent::__construct($number, $description);
     foreach ($attributes as $name => $value) {
         $this->setAttribute($name, $value);
     }
 }
コード例 #5
0
ファイル: Percentage.php プロジェクト: ju1ius/css-parser
 public function __construct($value)
 {
     parent::__construct($value, '%');
 }