本文整理汇总了PHP中vfsStream::getCurrentGroup方法的典型用法代码示例。如果您正苦于以下问题:PHP vfsStream::getCurrentGroup方法的具体用法?PHP vfsStream::getCurrentGroup怎么用?PHP vfsStream::getCurrentGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vfsStream
的用法示例。
在下文中一共展示了vfsStream::getCurrentGroup方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* constructor
*
* @param string $name
* @param int $permissions
*/
public function __construct($name, $permissions = 0777)
{
$this->name = $name;
$this->lastModified = time();
$this->permissions = $permissions;
$this->user = vfsStream::getCurrentUser();
$this->group = vfsStream::getCurrentGroup();
}
示例2: __construct
/**
* constructor
*
* @param string $name
* @param int $permissions optional
*/
public function __construct($name, $permissions = null)
{
$this->name = $name;
$time = time();
if (null === $permissions) {
$permissions = $this->getDefaultPermissions() & ~vfsStream::umask();
}
$this->lastAccessed = $time;
$this->lastAttributeModified = $time;
$this->lastModified = $time;
$this->permissions = $permissions;
$this->user = vfsStream::getCurrentUser();
$this->group = vfsStream::getCurrentGroup();
}
示例3: dir_opendir
/**
* opens a directory
*
* @param string $path
* @param int $options
* @return bool
*/
public function dir_opendir($path, $options)
{
$path = $this->resolvePath(vfsStream::path($path));
$this->dir = $this->getContentOfType($path, vfsStreamContent::TYPE_DIR);
if (null === $this->dir || $this->dir->isReadable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) {
return false;
}
$this->dirIterator = $this->dir->getIterator();
return true;
}
示例4: statReturnsFullDataForDirectoriesWithDot
/**
* @test
*/
public function statReturnsFullDataForDirectoriesWithDot()
{
$this->assertEquals(array(0 => 0, 1 => 0, 2 => 040777, 3 => 0, 4 => vfsStream::getCurrentUser(), 5 => vfsStream::getCurrentGroup(), 6 => 0, 7 => 0, 8 => 100, 9 => 100, 10 => 100, 11 => -1, 12 => -1, 'dev' => 0, 'ino' => 0, 'mode' => 040777, 'nlink' => 0, 'uid' => vfsStream::getCurrentUser(), 'gid' => vfsStream::getCurrentGroup(), 'rdev' => 0, 'size' => 0, 'atime' => 100, 'mtime' => 100, 'ctime' => 100, 'blksize' => -1, 'blocks' => -1), stat($this->fooURL . '/.'));
}
示例5: group
/**
* setting and retrieving owner group of a file
*
* @test
* @group permissions
*/
public function group()
{
$this->assertEquals(vfsStream::getCurrentGroup(), $this->file->getGroup());
$this->assertTrue($this->file->isOwnedByGroup(vfsStream::getCurrentGroup()));
$this->assertSame($this->file, $this->file->chgrp(vfsStream::GROUP_USER_1));
$this->assertEquals(vfsStream::GROUP_USER_1, $this->file->getGroup());
$this->assertTrue($this->file->isOwnedByGroup(vfsStream::GROUP_USER_1));
}
示例6: allPermissionsForOther
/**
* @test
* @group permissions
* @group bug_15
*/
public function allPermissionsForOther()
{
$abstractContent = new TestvfsStreamAbstractContent('foo', 07);
$this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()));
$this->assertFalse($abstractContent->isReadable(-1, vfsStream::getCurrentGroup()));
$this->assertTrue($abstractContent->isReadable(-1, -1));
$this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()));
$this->assertFalse($abstractContent->isWritable(-1, vfsStream::getCurrentGroup()));
$this->assertTrue($abstractContent->isWritable(-1, -1));
$this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()));
$this->assertFalse($abstractContent->isExecutable(-1, vfsStream::getCurrentGroup()));
$this->assertTrue($abstractContent->isExecutable(-1, -1));
}