当前位置: 首页>>代码示例>>PHP>>正文


PHP Func_Get_Args函数代码示例

本文整理汇总了PHP中Func_Get_Args函数的典型用法代码示例。如果您正苦于以下问题:PHP Func_Get_Args函数的具体用法?PHP Func_Get_Args怎么用?PHP Func_Get_Args使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Func_Get_Args函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Crypt_Decode

function Crypt_Decode($String, $Key = HOST_ID)
{
    /****************************************************************************/
    $__args_types = array('string', 'string');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    $String = Base64_Decode($String);
    #-----------------------------------------------------------------------------
    if (empty($String)) {
        return $String;
    }
    #-----------------------------------------------------------------------------
    if (Extension_Loaded('mcrypt')) {
        #---------------------------------------------------------------------------
        $Module =& Link_Get('Crypt');
        #---------------------------------------------------------------------------
        if (!Is_Resource($Module)) {
            #-------------------------------------------------------------------------
            $Module = @MCrypt_Module_Open(MCRYPT_DES, '', MCRYPT_MODE_ECB, '');
            if (!Is_Resource($Module)) {
                return ERROR | @Trigger_Error('[Crypt_Decode]: не удалось открыть дескриптор');
            }
            #-------------------------------------------------------------------------
            $Iv = @MCrypt_Create_Iv(MCrypt_Enc_Get_Iv_Size($Module), MCRYPT_RAND);
            if (!$Iv) {
                return ERROR | @Trigger_Error('[Crypt_Decode]: не удалось создать IV');
            }
            #-------------------------------------------------------------------------
            $Key = SubStr($Key, 0, MCrypt_Enc_Get_Key_Size($Module));
            #Debug(SPrintF("[system/libs/auto/Crypt]: Decode Key = %s",$Key));
            #-------------------------------------------------------------------------
            $IsInit = @MCrypt_Generic_Init($Module, $Key, $Iv);
            if (!Is_Integer($IsInit)) {
                return ERROR | @Trigger_Error('[Crypt_Decode]: не удалось инициализовать модуль дешифрования');
            }
        }
        #---------------------------------------------------------------------------
        $String = @MDecrypt_Generic($Module, $String);
        if (!Is_String($String)) {
            return ERROR | @Trigger_Error('[Crypt_Decode]: не удалось дешифровать данные');
        }
        #---------------------------------------------------------------------------
        $String = Trim($String);
        #---------------------------------------------------------------------------
    }
    #-----------------------------------------------------------------------------
    return $String;
}
开发者ID:carriercomm,项目名称:jbs,代码行数:50,代码来源:Crypt.php

示例2: Tree_Parents

function Tree_Parents($TableID, $RowID)
{
    /****************************************************************************/
    $__args_types = array('string', 'integer');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    $Regulars = Regulars();
    #-----------------------------------------------------------------------------
    if (!Preg_Match($Regulars['ID'], $TableID)) {
        return new gException('WRONG_TABLE_ID', 'Неверный идентификатор таблицы');
    }
    #-----------------------------------------------------------------------------
    $Row = DB_Select($TableID, '*', array('UNIQ', 'ID' => $RowID));
    #---------------------------------------------------------------------------
    switch (ValueOf($Row)) {
        case 'error':
            return ERROR | @Trigger_Error('[Tree_Parents]: не возможно найти запись');
        case 'exception':
            return new gException('ROW_NOT_FOUND', 'Запись не найдена');
        case 'array':
            #-------------------------------------------------------------------------
            $Query = SPrintF('SELECT * FROM `%s` `TableA` WHERE `ParentID` = %u AND `ID` != `ParentID` AND EXISTS(SELECT * FROM `%s` `TableB` WHERE `TableB`.`ParentID` = `TableA`.`ID`)', $TableID, $Row['ID'], $TableID);
            #-------------------------------------------------------------------------
            $IsQuery = DB_Query($Query);
            if (Is_Error($IsQuery)) {
                return ERROR | @Trigger_Error('[Tree_Parents]: не возможно найти дочерние записи');
            }
            #-------------------------------------------------------------------------
            $Childs = MySQL::Result($IsQuery);
            #-------------------------------------------------------------------------
            $Result = array($Row['ID']);
            #-------------------------------------------------------------------------
            foreach ($Childs as $Child) {
                #-----------------------------------------------------------------------
                $Parents = Tree_Parents($TableID, (int) $Child['ID']);
                #-----------------------------------------------------------------------
                switch (ValueOf($Parents)) {
                    case 'error':
                        return ERROR | @Trigger_Error('[Tree_Parents]: не возможно определить дочерние вхождения записей');
                    case 'exception':
                        return ERROR | @Trigger_Error('[Tree_Parents]: запись оказавшаяся дочерней не найдена');
                    case 'array':
                        $Result = Array_Merge($Result, $Parents);
                        break;
                    default:
                        return ERROR | @Trigger_Error(101);
                }
            }
            #-------------------------------------------------------------------------
            return $Result;
            break;
        default:
            return ERROR | @Trigger_Error(101);
    }
}
开发者ID:carriercomm,项目名称:jbs,代码行数:57,代码来源:Tree.php

示例3: __construct

 /**
  * Constructor.
  *
  * @param <type> $CodeID
  * @param <type> $String
  * @param <type> $Parent
  * @return <type>
  */
 function __construct($CodeID, $String, $Parent = NULL)
 {
     $__args_types = array('string', 'string', 'NULL,object');
     $__args__ = Func_Get_Args();
     eval(FUNCTION_INIT);
     Debug(SPrintF('[Exception]: [%s]=(%s)', $CodeID, $String));
     $this->CodeID = $CodeID;
     $this->String = $String;
     $this->Parent = $Parent;
     return $this;
 }
开发者ID:carriercomm,项目名称:jbs,代码行数:19,代码来源:Exception.class.php

示例4: Comp_IsLoaded

function Comp_IsLoaded($Path)
{
    /****************************************************************************/
    $__args_types = array('string');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    $Loaded =& Link_Get('Comp/Loaded', 'array');
    #-----------------------------------------------------------------------------
    return In_Array($Path, $Loaded);
}
开发者ID:carriercomm,项目名称:jbs,代码行数:12,代码来源:Comp.php

示例5: To_XML_String

function To_XML_String($Value, $Name = 'XML', $Level = 0)
{
    /******************************************************************************/
    $__args_types = array('array,string,integer,double,boolean,NULL', 'string,integer', 'integer');
    #-------------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /******************************************************************************/
    $Result = SPrintF('%s<%s', $Tab = $Level ? Str_Pad("\t", $Level, "\t") : '', $Name);
    #-------------------------------------------------------------------------------
    if (Is_Array($Value)) {
        #-------------------------------------------------------------------------------
        if (Count($Value) > 0) {
            #-------------------------------------------------------------------------------
            $Result = SPrintF("%s>\n", $Result);
            #-------------------------------------------------------------------------------
            foreach (Array_Keys($Value) as $Key) {
                $Result = SPrintF('%s%s', $Result, To_XML_String($Value[$Key], $Key, $Level + 1));
            }
            #-------------------------------------------------------------------------------
            $Result = SPrintF('%s%s', $Result, $Tab);
            #-------------------------------------------------------------------------------
        } else {
            #-------------------------------------------------------------------------------
            return SPrintF("%s type=\"array\" />\n", $Result);
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
    } else {
        #-------------------------------------------------------------------------------
        $Type = GetType($Value);
        #-------------------------------------------------------------------------------
        if ($Type != 'string') {
            $Result = SPrintF('%s type="%s"', $Result, $Type);
        }
        #-------------------------------------------------------------------------------
        if (StrLen($Value) > 0) {
            #-------------------------------------------------------------------------------
            $Value = HtmlSpecialChars((string) $Value);
            #-------------------------------------------------------------------------------
            $Result = SPrintF('%s>%s', $Result, $Value);
            #-------------------------------------------------------------------------------
        } else {
            #-------------------------------------------------------------------------------
            return SPrintF("%s />\n", $Result);
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
    return SPrintF("%s</%s>\n", $Result, $Name);
    #-------------------------------------------------------------------------------
}
开发者ID:carriercomm,项目名称:jbs,代码行数:53,代码来源:Standard.php

示例6: get

 public function get($key)
 {
     // Check args.
     $__args_types = array('string');
     $__args__ = Func_Get_Args();
     eval(FUNCTION_INIT);
     $result = apc_fetch($key);
     if (!$result) {
         Debug(SPrintF('[APCCache::get]: не удалось извлечь объект [key=%s]', $key));
     }
     return $result;
 }
开发者ID:carriercomm,项目名称:jbs,代码行数:12,代码来源:APCCache.class.php

示例7: get

 function get($key)
 {
     // Check args.
     $__args_types = array('string');
     $__args__ = Func_Get_Args();
     eval(FUNCTION_INIT);
     $key = SPrintF('[%s]-%s', HOST_ID, $key);
     $result = self::$memcached->get($key);
     if (!$result) {
         Debug(SPrintF('[MemcachedCache::get]: не удалось извлечь объект [key=%s]', $key));
     }
     return $result;
 }
开发者ID:carriercomm,项目名称:jbs,代码行数:13,代码来源:MemcachedCache.class.php

示例8: Color_RGB_Implode

function Color_RGB_Implode($R, $G, $B)
{
    /****************************************************************************/
    $__args_types = array('integer');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    $R = SPrintF('%02X', $R);
    $G = SPrintF('%02X', $G);
    $B = SPrintF('%02X', $B);
    #-----------------------------------------------------------------------------
    return SPrintF('%s%s%s', $R, $G, $B);
}
开发者ID:carriercomm,项目名称:jbs,代码行数:14,代码来源:Color.php

示例9: FLAP_Explode

function FLAP_Explode($String)
{
    /****************************************************************************/
    $__args_types = array('string');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    if (StrLen($String) < 6) {
        return FALSE;
    }
    #-----------------------------------------------------------------------------
    return array('Chanel' => Bytes_Get($String, 01), 'Number' => Bytes_Get($String, 02, 02), 'Data' => SubStr($String, 06));
}
开发者ID:carriercomm,项目名称:jbs,代码行数:14,代码来源:FLAP.php

示例10: Upload_Get

function Upload_Get($Name, $Hash = FALSE)
{
    /****************************************************************************/
    #$__args_types = Array('string');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    $Args = Args();
    #-----------------------------------------------------------------------------
    $Hash = isset($Args[$Name]) ? $Args[$Name] : $Hash;
    #-----------------------------------------------------------------------------
    if (!$Hash) {
        return new gException('HASH_IS_EMPTY', 'Хешь файла загрузки пуст');
    }
    #-----------------------------------------------------------------------------
    $Tmp = System_Element('tmp');
    if (Is_Error($Tmp)) {
        return ERROR | @Trigger_Error('[Upload_Get]: не удалось получить путь до временной директории');
    }
    #-----------------------------------------------------------------------------
    $Uploads = SPrintF('%s/uploads', $Tmp);
    #-----------------------------------------------------------------------------
    if (!File_Exists($Uploads)) {
        return new gException('HASH_IS_EMPTY', 'Директория файлов загрузки не создана');
    }
    #-----------------------------------------------------------------------------
    $Path = SPrintF('%s/%s', $Uploads, $Hash);
    #-----------------------------------------------------------------------------
    if (!File_Exists($Path)) {
        return new gException('FILE_NOT_FOUND', 'Файл не найден на сервере');
    }
    #-----------------------------------------------------------------------------
    $Data = IO_Read($Path);
    if (Is_Error($Data)) {
        return ERROR | @Trigger_Error('[Upload_Get]: не удалось прочитать файл');
    }
    #-----------------------------------------------------------------------------
    $Names = IO_Read(SPrintF('%s/names.txt', $Uploads));
    if (Is_Error($Names)) {
        return ERROR | @Trigger_Error('[Upload_Get]: не удалось прочитать файл имен');
    }
    #-----------------------------------------------------------------------------
    $Names = JSON_Decode($Names, TRUE);
    #-----------------------------------------------------------------------------
    $Name = isset($Names[$Hash]) ? $Names[$Hash] : 'Default';
    #-----------------------------------------------------------------------------
    return array('Name' => $Name, 'Data' => $Data);
}
开发者ID:carriercomm,项目名称:jbs,代码行数:49,代码来源:Upload.php

示例11: SNAC_Explode

function SNAC_Explode($String)
{
    /****************************************************************************/
    $__args_types = array('string');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    $Result = array('FamilyID' => Bytes_Get($String, 00, WORD), 'SubTypeID' => Bytes_Get($String, 02, WORD), 'Flag0' => Bytes_Get($String, 05, BUTE), 'Flag1' => Bytes_Get($String, 06, BUTE), 'RequestID' => Bytes_Get($String, 04, BUTE));
    #-----------------------------------------------------------------------------
    $Result['Data'] = SubStr($String, 11);
    # Сам пакет
    #-----------------------------------------------------------------------------
    return $Result;
}
开发者ID:carriercomm,项目名称:jbs,代码行数:15,代码来源:SNAC.php

示例12: TVL_Explode

function TVL_Explode($String, &$Array = array())
{
    /****************************************************************************/
    $__args_types = array('string', 'array');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    $Length = HexDec(Bytes_Get($String, 02, WORD));
    #-----------------------------------------------------------------------------
    $Array[Bytes_Get($String, 00, WORD)] = SubStr($String, 04, $Length);
    #-----------------------------------------------------------------------------
    if (StrLen($String = SubStr($String, 04 + $Length)) > 0) {
        TVL_Explode($String, $Array);
    }
    #-----------------------------------------------------------------------------
    return $Array;
}
开发者ID:carriercomm,项目名称:jbs,代码行数:18,代码来源:TVL.php

示例13: GetUsers

 public function GetUsers()
 {
     /******************************************************************************/
     $__args__ = Func_Get_Args();
     eval(FUNCTION_INIT);
     /******************************************************************************/
     Array_UnShift($__args__, $this->Settings);
     #-------------------------------------------------------------------------------
     $Function = SPrintF('%s_Get_Users', $this->SystemID);
     #-------------------------------------------------------------------------------
     if (!Function_Exists($Function)) {
         return new gException('FUNCTION_NOT_SUPPORTED', SPrintF('Функция (%s) не поддерживается API модулем', $Function));
     }
     #-------------------------------------------------------------------------------
     $Result = Call_User_Func_Array($Function, $__args__);
     if (Is_Error($Result)) {
         return ERROR | @Trigger_Error('[ISPswServer->GetUsers]: не удалось вызвать целевую функцию');
     }
     #-------------------------------------------------------------------------------
     return $Result;
     #-------------------------------------------------------------------------------
 }
开发者ID:carriercomm,项目名称:jbs,代码行数:22,代码来源:ISPswServer.class.php

示例14: ToXMLString

 function ToXMLString($Level = 0, $IsFormat = TRUE)
 {
     /****************************************************************************/
     $__args_types = array('integer', 'boolean');
     #-----------------------------------------------------------------------------
     $__args__ = Func_Get_Args();
     eval(FUNCTION_INIT);
     /****************************************************************************/
     $Name = $this->Name;
     #-----------------------------------------------------------------------------
     $Result = SPrintF('<%s', $Name);
     #-----------------------------------------------------------------------------
     if ($IsFormat) {
         $Result = SPrintF('%s%s', $Level ? Str_Pad(' ', $Level) : '', $Result);
     }
     #-----------------------------------------------------------------------------
     $Attribs = $this->Attribs;
     #-----------------------------------------------------------------------------
     foreach (Array_Keys($Attribs) as $AttribID) {
         $Result .= SPrintF(' %s="%s"', $AttribID, HtmlSpecialChars((string) $Attribs[$AttribID]));
     }
     #-----------------------------------------------------------------------------
     $Childs = $this->Childs;
     #-----------------------------------------------------------------------------
     if (Count($Childs)) {
         #---------------------------------------------------------------------------
         $Result .= '>';
         #---------------------------------------------------------------------------
         $IsNoCData = TRUE;
         #---------------------------------------------------------------------------
         foreach ($Childs as $Child) {
             #-------------------------------------------------------------------------
             if (In_Array($Child->Name, array('CDATA'))) {
                 #-----------------------------------------------------------------------
                 $IsNoCData = FALSE;
                 #-----------------------------------------------------------------------
                 break;
             }
         }
         #---------------------------------------------------------------------------
         $Nodes = '';
         #---------------------------------------------------------------------------
         foreach ($Childs as $Child) {
             $Nodes .= In_Array($Child->Name, array('CDATA')) ? HtmlSpecialChars($Child->Text) : $Child->ToXMLString($Level + 1, $IsNoCData);
         }
         #---------------------------------------------------------------------------
         $Result .= $IsNoCData ? SPrintF("\n%s%s", $Nodes, $Level ? Str_Pad(' ', $Level) : '') : $Nodes;
     } else {
         #---------------------------------------------------------------------------
         $Text = isset($Attribs['force-escape']) ? $this->Text : HtmlSpecialChars($this->Text);
         #---------------------------------------------------------------------------
         $IsShort = !Mb_StrLen($Text) && !In_Array($Name, array('TEXTAREA', 'BUTTON', 'TITLE', 'SCRIPT', 'TABLE', 'TD', 'TR'));
         #---------------------------------------------------------------------------
         if ($IsShort) {
             #-------------------------------------------------------------------------
             $Result .= ' />';
             #-------------------------------------------------------------------------
             if ($IsFormat) {
                 $Result .= "\n";
             }
             #-------------------------------------------------------------------------
             return $Result;
         } else {
             $Result .= SPrintF('>%s', $Text);
         }
     }
     #-----------------------------------------------------------------------------
     $Result .= SPrintF('</%s>', $Name);
     #-----------------------------------------------------------------------------
     if ($IsFormat) {
         $Result .= "\n";
     }
     #-----------------------------------------------------------------------------
     return $Result;
 }
开发者ID:carriercomm,项目名称:jbs,代码行数:75,代码来源:Tag.class.php

示例15: RuCenter_Get_Contract

function RuCenter_Get_Contract($Settings, $TicketID)
{
    /****************************************************************************/
    $__args_types = array('array', 'string');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    return array('ContractID' => $TicketID);
}
开发者ID:carriercomm,项目名称:jbs,代码行数:10,代码来源:RuCenter.php


注:本文中的Func_Get_Args函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。