Exemplo n.º 1
0
 /// <summary>
 /// Reads the currently executed file (a phar) and registers its manifest.
 /// </summary>
 /// <param name="ctx">Runtime context.</param>
 /// <param name="self">Current script.</param>
 /// <param name="alias">The alias that can be used in phar:// URLs to refer to this archive, rather than its full path.</param>
 /// <param name="dataoffset">Unused.</param>
 /// <returns>Always <c>true</c>.</returns>
 public static bool mapPhar(Context ctx, [ImportValue(ImportValueAttribute.ValueSpec.CallerScript)] RuntimeTypeHandle self, string alias = default, int dataoffset = 0)
 {
     if (PharExtensions.MapPhar(ctx, Type.GetTypeFromHandle(self), alias))
     {
         return(true);
     }
     else
     {
         throw new PharException();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Reads the currently executed file (a phar) and registers its manifest.
 /// </summary>
 /// <param name="ctx">Runtime context.</param>
 /// <param name="self">Current script.</param>
 /// <param name="alias">The alias that can be used in phar:// URLs to refer to this archive, rather than its full path.</param>
 /// <param name="dataoffset">Unused.</param>
 /// <returns>Always <c>true</c>.</returns>
 public static bool mapPhar(Context ctx, QueryValue <CallerScript> self, string alias = default, int dataoffset = 0)
 {
     if (PharExtensions.MapPhar(ctx, self.Value.ScriptType, alias))
     {
         return(true);
     }
     else
     {
         throw new PharException();
     }
 }