AdminPageFramework_Utility::showDeprecationNotice PHP Метод

showDeprecationNotice() публичный статический Метод

public static showDeprecationNotice ( $sDeprecated, $sAlternative = '', $sProgramName = 'Admin Page Framework' )
    public static function showDeprecationNotice($sDeprecated, $sAlternative = '', $sProgramName = 'Admin Page Framework')
    {
        trigger_error($sProgramName . ': ' . sprintf($sAlternative ? '<code>%1$s</code> has been deprecated. Use <code>%2$s</code> instead.' : '<code>%1$s</code> has been deprecated.', $sDeprecated, $sAlternative), E_USER_NOTICE);
    }

Usage Example

 public static function getAttributes(array $aAttributes)
 {
     AdminPageFramework_Utility::showDeprecationNotice(__METHOD__, 'AdminPageFramework_WPUtility::getAttributes()');
     $_sQuoteCharactor = "'";
     $_aOutput = array();
     foreach ($aAttributes as $sAttribute => $sProperty) {
         if (in_array(gettype($sProperty), array('array', 'object'))) {
             continue;
         }
         $_aOutput[] = "{$sAttribute}={$_sQuoteCharactor}{$sProperty}{$_sQuoteCharactor}";
     }
     return implode(' ', $_aOutput);
 }