args = $args; } public function __toString() { $s = 'cstmframe{'; $first = true; foreach ( $this->args as $name => $value ) { if ( $first ) { $first = false; } else { $s .= ', '; } $s .= "\"$name\":\"" . str_replace( '"', '\\"', $value->__toString() ) . '"'; } $s .= '}'; return $s; } /** * @return bool */ public function isEmpty() { return !count( $this->args ); } /** * @param int|string $index * @return string|bool */ public function getArgument( $index ) { return $this->args[$index] ?? false; } public function getArguments() { return $this->args; } }