/** * The keys for the required rows * * @param mixed $rows Something that can be made into an array using \MUtil_Ra::to() * @return \MUtil_Model_Transform_RequiredRowsTransformer * @throws \MUtil_Model_ModelException */ public function setRequiredRows($rows) { if (\MUtil_Ra::is($rows)) { $this->_requiredRows = $rows; return $this; } throw new \MUtil_Model_ModelException('Invalid parameter type for ' . __FUNCTION__ . ': $rows cannot be converted to an array.'); }
/** * Set the current stack * * @param mixed $stack Value to be turned into stack for evaluation * @return \MUtil_Lazy_StackInterface */ public static function setStack($stack) { if ($stack instanceof \MUtil_Lazy_StackInterface) { self::$_stack = $stack; } elseif ($stack instanceof \MUtil_Model_Bridge_TableBridgeAbstract) { self::$_stack = new \MUtil_Lazy_Stack_BridgeStack($stack); } elseif ($stack instanceof \MUtil_Lazy_Repeatable) { self::$_stack = new RepeatableStack($stack); } elseif (\MUtil_Ra::is($stack)) { $stack = \MUtil_Ra::to($stack); self::$_stack = new \MUtil_Lazy_Stack_ArrayStack($stack); } elseif (is_object($stack)) { self::$_stack = new \MUtil_Lazy_Stack_ObjectStack($stack); } else { throw new \MUtil_Lazy_LazyException("Lazy stack set to invalid scalar type."); } return self::$_stack; }
function is_ra_array($value) { return \MUtil_Ra::is($value); }