本文整理汇总了PHP中Quota::unlimited方法的典型用法代码示例。如果您正苦于以下问题:PHP Quota::unlimited方法的具体用法?PHP Quota::unlimited怎么用?PHP Quota::unlimited使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Quota
的用法示例。
在下文中一共展示了Quota::unlimited方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unlimitedQuotaHasAlwaysSpaceLeft
/**
* @test
*/
public function unlimitedQuotaHasAlwaysSpaceLeft()
{
$this->assertEquals(303, Quota::unlimited()->spaceLeft(303));
}
示例2: register
/**
* method to register the stream wrapper
*
* Please be aware that a call to this method will reset the root element
* to null.
* If the stream is already registered the method returns silently. If there
* is already another stream wrapper registered for the scheme used by
* vfsStream a vfsStreamException will be thrown.
*
* @throws vfsStreamException
*/
public static function register()
{
self::$root = null;
self::$quota = Quota::unlimited();
if (true === self::$registered) {
return;
}
if (@stream_wrapper_register(vfsStream::SCHEME, __CLASS__) === false) {
throw new vfsStreamException('A handler has already been registered for the ' . vfsStream::SCHEME . ' protocol.');
}
self::$registered = true;
}