Hoa central
RealdomObject.php
Go to the documentation of this file.
1 <?php
2 
37 namespace Hoa\Realdom;
38 
39 use Hoa\Math;
40 
49 class RealdomObject extends Realdom
50 {
56  const NAME = 'object';
57 
63  protected $_arguments = [
64  'object' => null
65  ];
66 
67 
68 
75  protected function _predicate($q)
76  {
77  return
78  is_object($q) &&
79  $q === $this['object'];
80  }
81 
88  protected function _sample(Math\Sampler $sampler)
89  {
90  return $this['object'];
91  }
92 
99  public function setObject($object)
100  {
101  $old = $this['object'];
102  $this['object'] = $object;
103 
104  return $old;
105  }
106 }
_sample(Math\Sampler $sampler)