<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.phar.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'phar.setalias.php',
    1 => 'Phar::setAlias',
    2 => 'Set the alias for the Phar archive',
  ),
  'up' => 
  array (
    0 => 'class.phar.php',
    1 => 'Phar',
  ),
  'prev' => 
  array (
    0 => 'phar.running.php',
    1 => 'Phar::running',
  ),
  'next' => 
  array (
    0 => 'phar.setdefaultstub.php',
    1 => 'Phar::setDefaultStub',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/phar/Phar/setAlias.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="phar.setalias" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Phar::setAlias</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8, PECL phar &gt;= 1.2.1)</p><p class="refpurpose"><span class="refname">Phar::setAlias</span> &mdash; <span class="dc-title">Set the alias for the Phar archive</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-phar.setalias-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Phar::setAlias</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$alias</code></span>): <span class="type"><a href="language.types.singleton.php" class="type true">true</a></span></div>

  <blockquote class="note"><p><strong class="note">Bilginize</strong>: 
<p class="para"><span class="classname"><a href="class.phar.php" class="classname">Phar</a></span> nesneleri ile çalışmak için, bu yöntem
<code class="literal">phar.readonly</code> <var class="filename">php.ini</var> yönergesine <code class="literal">0</code>
atanmış olmasını gerektirir. Aksi takdirde bir
<span class="classname"><a href="class.pharexception.php" class="classname">PharException</a></span> istisnası oluşur.</p></p></blockquote>

  <p class="para">
   Set the alias for the Phar archive, and write it as the permanent alias
   for this phar archive.  An alias can be used internally to a phar archive to
   ensure that use of the <code class="literal">phar</code> stream wrapper to access internal
   files always works regardless of the location of the phar archive on the
   filesystem.  Another alternative is to rely upon Phar&#039;s interception of
   <span class="function"><a href="function.include.php" class="function">include</a></span> or to use <span class="function"><a href="phar.interceptfilefuncs.php" class="function">Phar::interceptFileFuncs()</a></span>
   and use relative paths.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-phar.setalias-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">alias</code></dt>
     <dd>
      <p class="para">
       A shorthand string that this archive can be referred to in <code class="literal">phar</code>
       stream wrapper access.
      </p>
     </dd>
    
   </dl>
  </p>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-phar.setalias-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
  <p class="simpara">
   Daima <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> döndürür.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-phar.setalias-errors">
  <h3 class="title">Hatalar/İstisnalar</h3>
  <p class="para">
   Throws <span class="classname"><a href="class.unexpectedvalueexception.php" class="classname">UnexpectedValueException</a></span> when write access
   is disabled, and <span class="classname"><a href="class.pharexception.php" class="classname">PharException</a></span> if the alias is
   already in use or any problems were encountered flushing changes to disk.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-phar.setalias-changelog">
  <h3 class="title">Sürüm Bilgisi</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Sürüm: </th>
      <th>Açıklama</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       <span class="methodname"><strong>Phar::setAlias()</strong></span>
       now has a tentative return of <span class="type"><a href="language.types.singleton.php" class="type true">true</a></span>.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-phar.setalias-examples">
  <h3 class="title">Örnekler</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Örnek 1 A <span class="function"><strong>Phar::setAlias()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">try {<br />    </span><span style="color: #0000BB">$phar </span><span style="color: #007700">= new </span><span style="color: #0000BB">Phar</span><span style="color: #007700">(</span><span style="color: #DD0000">'myphar.phar'</span><span style="color: #007700">);<br />    </span><span style="color: #0000BB">$phar</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setAlias</span><span style="color: #007700">(</span><span style="color: #DD0000">'myp.phar'</span><span style="color: #007700">);<br />} catch (</span><span style="color: #0000BB">Exception $e</span><span style="color: #007700">) {<br />    </span><span style="color: #FF8000">// handle error<br /></span><span style="color: #007700">}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-phar.setalias-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="phar.construct.php" class="function" rel="rdfs-seeAlso">Phar::__construct()</a> - Construct a Phar archive object</span></li>
    <li><span class="function"><a href="phar.interceptfilefuncs.php" class="function" rel="rdfs-seeAlso">Phar::interceptFileFuncs()</a> - Instructs phar to intercept fopen, file_get_contents, opendir, and all of the stat-related functions</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>