src/Annotation/FunctionAnnotation.php
public final function parse($param_str) {
        $params = explode(",", $param_str);
        foreach ($params as $param_item) {
            $param_kv = explode("=", $param_item);
            $param_key = trim($param_kv[0]);
            $param_value = trim($param_kv[1]);
            if ('"' === substr($param_key, 0, 1) && '"' === substr($param_key, -1, 1)) {
                $param_key = substr($param_key, 1, strlen($param_key) - 2);
            }
            if ('"' === substr($param_value, 0, 1) && '"' === substr($param_value, -1, 1)) {
                // This param_value is a string type, which could be set directly
                if (property_exists($this, $param_key)) {
                    $this->$param_key = substr($param_value, 1, strlen($param_value) - 2);
                } else {
                    // @TODO support special variables like from `@use`
                }
            }
        }
    }
public final function parse($param_str) {
        $params = explode(",", $param_str);
        foreach ($params as $param_item) {
            $param_kv = explode("=", $param_item);
            $param_key = trim($param_kv[0]);
            $param_value = trim($param_kv[1]);
            if ('"' === substr($param_key, 0, 1) && '"' === substr($param_key, -1, 1)) {
                $param_key = substr($param_key, 1, strlen($param_key) - 2);
            }
            if ('"' === substr($param_value, 0, 1) && '"' === substr($param_value, -1, 1)) {
                // This param_value is a string type, which could be set directly
                if (property_exists($this, $param_key)) {
                    $this->$param_key = substr($param_value, 1, strlen($param_value) - 2);
                } else {
                    // @TODO support special variables like from `@use`
                }
            }
        }
    }
public final function parse ( $ param_str ) { $ params = explode ( "," , $ param_str ) ; foreach ( $ params as $ param_item ) { $ param_kv = explode ( "=" , $ param_item ) ; $ param_key = trim ( $ param_kv [ 0 ] ) ; $ param_value = trim ( $ param_kv [ 1 ] ) ; if ( '"' === substr ( $ param_key , 0 , 1 ) && '"' === substr ( $ param_key , - 1 , 1 ) ) { $ param_key = substr ( $ param_key , 1 , strlen ( $ param_key ) - 2 ) ; } if ( '"' === substr ( $ param_value , 0 , 1 ) && '"' === substr ( $ param_value , - 1 , 1 ) ) { // This param_value is a string type, which could be set directly if ( property_exists ( $ this , $ param_key ) ) { $ this -> $ param_key = substr ( $ param_value , 1 , strlen ( $ param_value ) - 2 ) ; } else { // @TODO support special variables like from `@use` } } } }
wait for the end of the compiling and then exec this function.
wait for the end of the compiling and then exec this function .