<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionclass.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'reflectionclass.setstaticpropertyvalue.php',
    1 => 'ReflectionClass::setStaticPropertyValue',
    2 => 'Устанавливает значение общедоступного статического свойства',
  ),
  'up' => 
  array (
    0 => 'class.reflectionclass.php',
    1 => 'ReflectionClass',
  ),
  'prev' => 
  array (
    0 => 'reflectionclass.resetaslazyproxy.php',
    1 => 'ReflectionClass::resetAsLazyProxy',
  ),
  'next' => 
  array (
    0 => 'reflectionclass.tostring.php',
    1 => 'ReflectionClass::__toString',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/reflection/reflectionclass/setstaticpropertyvalue.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionclass.setstaticpropertyvalue" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionClass::setStaticPropertyValue</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.2, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionClass::setStaticPropertyValue</span> &mdash; <span class="dc-title">Устанавливает значение общедоступного статического свойства</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionclass.setstaticpropertyvalue-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionClass::setStaticPropertyValue</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="simpara">
   Устанавливает значение общедоступного статического свойства.
   Если свойство является закрытым или защищённым, метод завершится с ошибкой.
  </p>
  <p class="simpara">
   Метод <span class="methodname"><a href="reflectionproperty.setvalue.php" class="methodname">ReflectionProperty::setValue()</a></span> позволяет устанавливать
   значение общедоступных, закрытых и защищённых свойств.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionclass.setstaticpropertyvalue-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">name</code></dt>
     <dd>
      <p class="para">
       Имя свойства.
      </p>
     </dd>
    
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       Новое значение.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionclass.setstaticpropertyvalue-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Функция не возвращает значения после выполнения.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-reflectionclass.setstaticpropertyvalue-changelog">
  <h3 class="title">Список изменений</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версия</th>
      <th>Описание</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>7.4.0</td>
      <td>
       Использование метода <span class="methodname"><strong>ReflectionClass::setStaticPropertyValue()</strong></span>
       для установки частного или защищённого свойства теперь приводит к фатальной ошибке.
       Ранее выбрасывалось исключение <span class="classname"><a href="class.reflectionexception.php" class="classname">ReflectionException</a></span>.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionclass.setstaticpropertyvalue-seealso">
  <h3 class="title">Смотрите также</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionclass.getstaticpropertyvalue.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getStaticPropertyValue()</a> - Возвращает значение статического свойства</span></li>
    <li><span class="methodname"><a href="reflectionproperty.setvalue.php" class="methodname" rel="rdfs-seeAlso">ReflectionProperty::setValue()</a> - Устанавливает значение свойству</span></li>
   </ul>
  </p>
 </div>


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