Exemple #1
0
 /**
  * Creates the global constructor used in user-land
  * @return Func
  */
 static function getGlobalConstructor()
 {
     $Buffer = new Func('Buffer', function () {
         $self = new Buffer();
         $self->init(func_get_args());
         return $self;
     });
     $Buffer->set('prototype', Buffer::$protoObject);
     $Buffer->setMethods(Buffer::$classMethods, true, false, true);
     return $Buffer;
 }