Пример #1
0
 /**
  * Get type
  *
  * @return string
  */
 public function getType()
 {
     if ($this->storage->isDir($this->key)) {
         return self::TYPE_DIR;
     }
     return pathinfo($this->key, PATHINFO_EXTENSION);
 }
Пример #2
0
 public function testIsDir()
 {
     $this->storage->storeItem('dir/file', 'data');
     $this->assertFalse($this->storage->isDir('dir/file'));
     $this->assertTrue($this->storage->isDir('dir'));
 }