當前位置: 首頁>>代碼示例>>PHP>>正文


PHP vfsStream::getCurrentUser方法代碼示例

本文整理匯總了PHP中vfsStream::getCurrentUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP vfsStream::getCurrentUser方法的具體用法?PHP vfsStream::getCurrentUser怎麽用?PHP vfsStream::getCurrentUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vfsStream的用法示例。


在下文中一共展示了vfsStream::getCurrentUser方法的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();
 }
開發者ID:pago,項目名稱:pantr,代碼行數:14,代碼來源:vfsStreamAbstractContent.php

示例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();
 }
開發者ID:alexschwarz89,項目名稱:Barzahlen-OXID-4.7,代碼行數:20,代碼來源:vfsStreamAbstractContent.php

示例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;
 }
開發者ID:oalkhanishvili,項目名稱:track2,代碼行數:17,代碼來源:vfsStreamWrapper.php

示例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 . '/.'));
 }
開發者ID:elagith,項目名稱:learningMaterial,代碼行數:7,代碼來源:vfsStreamWrapperTestCase.php

示例5: owner

 /**
  * setting and retrieving owner of a file
  *
  * @test
  * @group  permissions
  */
 public function owner()
 {
     $this->assertEquals(vfsStream::getCurrentUser(), $this->file->getUser());
     $this->assertTrue($this->file->isOwnedByUser(vfsStream::getCurrentUser()));
     $this->assertSame($this->file, $this->file->chown(vfsStream::OWNER_USER_1));
     $this->assertEquals(vfsStream::OWNER_USER_1, $this->file->getUser());
     $this->assertTrue($this->file->isOwnedByUser(vfsStream::OWNER_USER_1));
 }
開發者ID:kdambekalns,項目名稱:vfsStream,代碼行數:14,代碼來源:vfsStreamFileTestCase.php

示例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));
 }
開發者ID:mikey179,項目名稱:vfsstream,代碼行數:18,代碼來源:vfsStreamAbstractContentTestCase.php


注:本文中的vfsStream::getCurrentUser方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。