New() public static method

Creates an instance of PhpArray filled by given values.
public static New ( ) : PhpArray
return PhpArray
Example #1
0
 public override PhpArray ToArray(ref PhpValue me) => PhpArray.New(me);
Example #2
0
 public override PhpArray ToArray(ref PhpValue me) => PhpArray.New(me.DeepCopy());
Example #3
0
 public PhpArray ToArray() => PhpArray.New(ToPhpValue());
Example #4
0
 public static PhpArray ToArray(double value) => PhpArray.New(value);
Example #5
0
 public static PhpArray ToArray(bool value) => PhpArray.New(value);
Example #6
0
 public static PhpArray ToArray(long value) => PhpArray.New(value);
Example #7
0
 public PhpArray ToArray() => PhpArray.New(PhpValue.Create(this.DeepCopy()));
Example #8
0
 /// <summary>
 /// Binds <see cref="PhpInvokable"/> to <see cref="PhpCallable"/> while wrapping arguments to a single argument of type <see cref="PhpArray"/>.
 /// </summary>
 internal static PhpCallable BindMagicCall(this PhpInvokable invokable, object target, string name)
 => (ctx, arguments) => invokable(ctx, target, new[] { (PhpValue)name, (PhpValue)PhpArray.New(arguments) });
Example #9
0
 PhpArray IPhpConvertible.ToArray() => PhpArray.New(PhpValue.FromClass(this));
Example #10
0
 public PhpArray ToArray() => PhpArray.New(PhpValue.Create(this));