本文整理汇总了PHP中Folder::getURI方法的典型用法代码示例。如果您正苦于以下问题:PHP Folder::getURI方法的具体用法?PHP Folder::getURI怎么用?PHP Folder::getURI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Folder
的用法示例。
在下文中一共展示了Folder::getURI方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @param io.Folder folder
* @throws lang.IllegalArgumentException if the given folder does not exist
*/
public function __construct(Folder $folder)
{
if (!$folder->exists()) {
throw new IllegalArgumentException('Folder "' . $folder->getURI() . '" does not exist!');
}
$this->folder = $folder;
}
示例2: cleanupSessionSavePath
public static function cleanupSessionSavePath()
{
$f = new Folder(session_save_path());
while ($e = $f->getEntry()) {
if (0 === strncmp('sess_', $e, 5)) {
unlink($f->getURI() . $e);
}
}
}
示例3: getFolder
/**
* Opens a subfolder of the current folder and returns
* an object of that mailbox.
*
* @param string foldername
* @return peer.mail.MailFolder folder;
*/
public function getFolder($name)
{
$f = new Folder($this->_folder->getURI() . DIRECTORY_SEPARATOR . $name);
if (!$f->exists()) {
throw new MessagingException('Maildir does not exist: ' . $f->getURI());
}
$mf = new MailFolder($this, $name);
return $mf;
}
示例4: setBase
/**
* Gets base folder
*
* @param io.Folder
*/
public function setBase(Folder $base)
{
$this->base = new Folder($base, '..');
// Scan base path. FIXME: Refactor this to use lang.ClassLoader
// instead of duplication its sourcecode here
foreach (array_filter(explode(PATH_SEPARATOR, scanpath(array($base->getURI()), getenv('HOME')))) as $element) {
$resolved = realpath($element);
if (is_dir($resolved)) {
$this->cl[] = FileSystemClassLoader::instanceFor($resolved, FALSE);
} else {
if (is_file($resolved)) {
$this->cl[] = ArchiveClassLoader::instanceFor($resolved, FALSE);
}
}
}
}
示例5: pathClassCanBeUsedAsArg
public function pathClassCanBeUsedAsArg()
{
$f = new Folder(new Path($this->temp));
$this->assertEquals($this->temp, $f->getURI());
}
示例6: parentDirectory
public function parentDirectory()
{
$f = new Folder('..');
$this->assertEquals($this->normalize(realpath('..')), $f->getURI());
}
示例7: rooted_folder
public function rooted_folder()
{
$rooted = new Folder('/rooted');
$this->assertEquals(substr($rooted->getURI(), 0, -1), (new Path($rooted))->toString());
}