Lines Matching refs:phar
2 Phar: getAlias() with an existing phar.zip
4 phar
6 phar.readonly=0
7 phar.require_hash=0
11 $fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip';
13 // sanity check with a virgin phar.zip
14 $phar = new Phar($fname);
15 var_dump($phar->getAlias());
16 unset($phar);
18 copy(__DIR__ . '/files/metadata.phar.zip', $fname);
20 // existing phar.zip, no alias set
21 $phar = new Phar($fname);
22 var_dump($phar->getAlias());
25 $phar->setAlias('jiminycricket');
26 var_dump($phar->getAlias());
27 unset($phar);
29 // existing phar.zip, alias set
30 $phar = new Phar($fname);
31 var_dump($phar->getAlias());
35 $phar['.phar/alias.txt'] = 'pinocchio';
39 var_dump($phar->getAlias());
42 $phar->setAlias('pinocchio');
43 var_dump($phar->getAlias());
48 unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
52 string(%d) "%sgetalias.phar.zip"
53 string(%d) "%sgetalias.phar.zip"
56 Cannot set alias ".phar/alias.txt" directly in phar "%sgetalias.phar.zip", use setAlias