Пример #1
0
 void KPHPArrayObject::Set(const char* name, KValueRef value)
 {
     // Check for integer value as name
     if (KList::IsInt(name))
     {
         this->SetAt(KList::ToIndex(name), value);
     }
     else
     {
         AddKrollValueToPHPArray(value, this->list, name);
     }
 }
Пример #2
0
	void KPHPArrayObject::Set(const char *name, KValueRef value)
	{
		// Check for integer value as name
		int index = -1;
		if (KList::IsInt(name) && ((index = atoi(name)) >=0))
		{
			this->SetAt((unsigned int) index, value);
		}
		else
		{
			AddKrollValueToPHPArray(value, this->list, name);
		}
	}