Exemplo n.º 1
0
        public static PhpReference Unserialize(PHP.Core.Reflection.DTypeDesc caller, PhpBytes bytes)
        {
            if (bytes == null || bytes.Length == 0)
            {
                return(new PhpReference(false));
            }

            LibraryConfiguration config = LibraryConfiguration.GetLocal(ScriptContext.CurrentContext);

            return(config.Serialization.DefaultSerializer.Deserialize(bytes, caller));
        }
Exemplo n.º 2
0
 protected override PHP.Core.Reflection.DObject CloneObjectInternal(PHP.Core.Reflection.DTypeDesc caller, ScriptContext context, bool deepCopyFields)
 {
     if (IsAssociated)
     {
         return(new DOMEntity(XmlEntity));
     }
     else
     {
         return(new DOMEntity());
     }
 }
Exemplo n.º 3
0
 protected override PHP.Core.Reflection.DObject CloneObjectInternal(PHP.Core.Reflection.DTypeDesc caller, ScriptContext context, bool deepCopyFields)
 {
     if (IsAssociated)
     {
         return(new DOMDocumentType(XmlDocumentType));
     }
     else
     {
         return(new DOMDocumentType(this._qualifiedName, this._publicId, this._systemId));
     }
 }
Exemplo n.º 4
0
 protected override PHP.Core.Reflection.DObject CloneObjectInternal(PHP.Core.Reflection.DTypeDesc caller, ScriptContext context, bool deepCopyFields)
 {
     if (IsAssociated)
     {
         return(new DOMText(XmlText));
     }
     else
     {
         return(CreateDOMText(_value));
     }
 }
Exemplo n.º 5
0
 protected override PHP.Core.Reflection.DObject CloneObjectInternal(PHP.Core.Reflection.DTypeDesc caller, ScriptContext context, bool deepCopyFields)
 {
     if (IsAssociated)
     {
         return(new DOMComment(XmlComment));
     }
     else
     {
         DOMComment copy = new DOMComment();
         copy.__construct(this._value);
         return(copy);
     }
 }
Exemplo n.º 6
0
        public static bool IsCallable(PHP.Core.Reflection.DTypeDesc caller, object variable, bool syntaxOnly, out string callableName)
        {
            PhpCallback callback = PHP.Core.Convert.ObjectToCallback(variable, true);

            if (callback == null || callback.IsInvalid)
            {
                callableName = PHP.Core.Convert.ObjectToString(variable);
                return(false);
            }

            callableName = ((IPhpConvertible)callback).ToString();
            return(syntaxOnly ? true : callback.Bind(true, caller, null));
        }
Exemplo n.º 7
0
 protected override PHP.Core.Reflection.DObject CloneObjectInternal(PHP.Core.Reflection.DTypeDesc caller, ScriptContext context, bool deepCopyFields)
 {
     if (IsAssociated)
     {
         return(new DOMEntityReference(XmlEntityReference));
     }
     else
     {
         DOMEntityReference copy = new DOMEntityReference();
         copy.__construct(this._name);
         return(copy);
     }
 }
Exemplo n.º 8
0
 protected override PHP.Core.Reflection.DObject CloneObjectInternal(PHP.Core.Reflection.DTypeDesc caller, ScriptContext context, bool deepCopyFields)
 {
     return(new DOMCharacterData());
 }
Exemplo n.º 9
0
 public PDO(ScriptContext /*!*/ context, PHP.Core.Reflection.DTypeDesc caller)
     : base(context, caller)
 {
 }
Exemplo n.º 10
0
        public static PhpBytes Serialize(PHP.Core.Reflection.DTypeDesc caller, object variable)
        {
            LibraryConfiguration config = LibraryConfiguration.GetLocal(ScriptContext.CurrentContext);

            return(config.Serialization.DefaultSerializer.Serialize(variable, caller));
        }
Exemplo n.º 11
0
 public static bool IsCallable(PHP.Core.Reflection.DTypeDesc caller, object variable, bool syntaxOnly)
 {
     return(Operators.IsCallable(variable, caller, syntaxOnly));
 }
Exemplo n.º 12
0
 public static bool IsCallable(PHP.Core.Reflection.DTypeDesc caller, object variable)
 {
     return(IsCallable(caller, variable, false));
 }
Exemplo n.º 13
0
 protected override PHP.Core.Reflection.DObject CloneObjectInternal(PHP.Core.Reflection.DTypeDesc caller, ScriptContext context, bool deepCopyFields)
 {
     return(new DOMDocumentFragment(XmlDocumentFragment));
 }