/** * Get the number of times a function has been called. * * @param string $unique The function unique ID * * @return int */ public static function hasBeenCalledTimes($unique) { return ArraysMethods::setAndGet(static::$canBeCalledTimes, $unique, 0); }
/** * Unpack an object's properties */ public static function unpack($object, $attribute = null) { $object = (array) $object; $object = $attribute ? ArraysMethods::get($object, $attribute) : ArraysMethods::first($object); return (object) $object; }