Lines Matching refs:options
131 global $options;
143 printf('cd %s%s%s', $options['dir'], $options['ext'], PHP_EOL);
155 $options = [
181 $options['windows'] = false;
185 $options['unix'] = false;
189 $options['experimental'] = true;
193 $options['std'] = true;
205 … $options[$opt] = ($opt == 'dir' ? realpath($argv[$i + 1]) . DIRECTORY_SEPARATOR : $argv[$i + 1]);
214 if (empty($options['ext'])) {
216 } else if (!$options['unix'] && !$options['windows']) {
218 } else if (!is_dir($options['skel'])) {
223 if (!preg_match('/^[a-z][a-z0-9_]+$/i', $options['ext'])) {
229 $options['ext'] = str_replace(['\\', '/'], '', strtolower($options['ext']));
231 return $options;
237 global $options;
245 $source = str_replace('%EXTNAME%', $options['ext'], $source);
246 $source = str_replace('%EXTNAMECAPS%', strtoupper($options['ext']), $source);
252 if ($options['std']) {
253 $author_len = strlen($options['author']);
254 …$credits = $options['author'] . ($author_len && $author_len <= 60 ? str_repeat(' ', 60 - $author_l…
274 if ($options['author']) {
275 …$header = sprintf('/* %s extension for PHP (c) %d %s */', $options['ext'], date('Y'), $options['au…
277 $header = sprintf('/* %s extension for PHP */', $options['ext']);
293 global $options;
297 if ($options['unix']) {
301 if ($options['windows']) {
308 … $new_config_script = $options['dir'] . $options['ext'] . DIRECTORY_SEPARATOR . $config_script;
310 if (!copy($options['skel'] . $config_script . '.in', $new_config_script)) {
321 global $options;
324 'skeleton.c' => $options['ext'] . '.c',
325 'skeleton.stub.php' => $options['ext'] . '.stub.php',
326 'php_skeleton.h' => 'php_' . $options['ext'] . '.h',
327 'skeleton_arginfo.h' => $options['ext'] . '_arginfo.h'
331 …if (!copy($options['skel'] . $src_file, $options['dir'] . $options['ext'] . DIRECTORY_SEPARATOR . …
335 …process_source_tags($options['dir'] . $options['ext'] . DIRECTORY_SEPARATOR . $dst_file, $dst_file…
342 global $options;
344 $test_files = glob($options['skel'] . 'tests/*', GLOB_MARK);
355 $new_test = str_replace([$options['skel'], '/'], ['', DIRECTORY_SEPARATOR], $test);
357 if (!copy($test, $options['dir'] . $options['ext'] . DIRECTORY_SEPARATOR . $new_test)) {
361 …process_source_tags($options['dir'] . $options['ext'] . DIRECTORY_SEPARATOR . $new_test, $new_test…
376 $options = process_args($argv, $argc); variable
378 if (!$options['dir'] || !is_dir($options['dir'])) {
380 } else if (is_dir($options['dir'] . $options['ext'])) {
381 error('There is already a folder named "' . $options['ext'] . '" in the output directory');
382 } else if (!mkdir($options['dir'] . $options['ext'])) {
384 } else if (!mkdir($options['dir'] . $options['ext'] . DIRECTORY_SEPARATOR . 'tests')) {
388 if ($options['experimental']) {
391 …if (file_put_contents($options['dir'] . $options['ext'] . DIRECTORY_SEPARATOR . 'EXPERIMENTAL', ''…
398 if (!empty($options['author'])) {
401 …if (!file_put_contents($options['dir'] . $options['ext'] . DIRECTORY_SEPARATOR . 'CREDITS', $optio…