예제 #1
0
 /**
  * @throws InvalidArgumentException When an invalid value is written.
  * @throws UnexpectedValueException When an unspecified attribute is
  * read or written.
  */
 public function __set($attribute, $value)
 {
     if (!$this->isValidAttribute($attribute)) {
         throw new \UnexpectedValueException("Unknown attribute: {$attribute}");
     }
     if (!$this->isValidValue($attribute, $value)) {
         throw new \InvalidArgumentException("Invalid value for {$attribute} provided " . Dump::pretty($value, 1));
     }
     $this->attribute_data[$attribute] = $value;
 }
예제 #2
0
파일: Trace.php 프로젝트: mover-io/belt
 public function _debug($value, $depth = 1)
 {
     $result = $this->_generateLine(Dump::pretty($value, $this->options['inspect']['depth'], array(), array(), 1, $this->options['inspect']['color']));
     if ($this->options['tint']) {
         $result = Text::tint($this->options['tint'], $result);
     }
     $this->writeLn($result);
 }