ReflectionClass::__construct

(PHP 5, PHP 7)

ReflectionClass::__construct锟斤拷始锟斤拷 ReflectionClass 锟斤拷

说锟斤拷

public ReflectionClass::__construct ( mixed $argument )

锟斤拷始锟斤拷锟铰碉拷 ReflectionClass 锟斤拷锟斤拷

锟斤拷锟斤拷

argument

锟饺匡拷锟斤拷锟角帮拷锟斤拷锟斤拷锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷string锟斤拷也锟斤拷锟斤拷锟角讹拷锟斤拷object锟斤拷锟斤拷

锟斤拷锟斤拷值

锟斤拷锟截筹拷始锟斤拷锟斤拷珊锟斤拷 ReflectionClass 实锟斤拷锟斤拷

锟斤拷锟斤拷锟届常

锟斤拷锟揭拷锟斤拷锟斤拷 Class 锟斤拷锟斤拷锟节o拷锟阶筹拷锟届常 ReflectionException锟斤拷

锟斤拷锟斤拷

Example #1 ReflectionClass 锟侥伙拷锟斤拷锟矫凤拷

<?php
Reflection
::export(new ReflectionClass('Exception'));
?>

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

Class [ <internal:Core> class Exception ] {

  - Constants [0] {
  }

  - Static properties [0] {
  }

  - Static methods [0] {
  }

  - Properties [7] {
    Property [ <default> protected $message ]
    Property [ <default> private $string ]
    Property [ <default> protected $code ]
    Property [ <default> protected $file ]
    Property [ <default> protected $line ]
    Property [ <default> private $trace ]
    Property [ <default> private $previous ]
  }

  - Methods [10] {
    Method [ <internal:Core> final private method __clone ] {
    }

    Method [ <internal:Core, ctor> public method __construct ] {

      - Parameters [3] {
        Parameter #0 [ <optional> $message ]
        Parameter #1 [ <optional> $code ]
        Parameter #2 [ <optional> $previous ]
      }
    }

    Method [ <internal:Core> final public method getMessage ] {
    }

    Method [ <internal:Core> final public method getCode ] {
    }

    Method [ <internal:Core> final public method getFile ] {
    }

    Method [ <internal:Core> final public method getLine ] {
    }

    Method [ <internal:Core> final public method getTrace ] {
    }

    Method [ <internal:Core> final public method getPrevious ] {
    }

    Method [ <internal:Core> final public method getTraceAsString ] {
    }

    Method [ <internal:Core> public method __toString ] {
    }
  }
}

锟轿硷拷