__construct() public method

public __construct ( )
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 /**
  * 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);
     }
 }
Exemplo n.º 5
0
 public function __construct($value)
 {
     parent::__construct($value, '%');
 }