How to use getProjectName method of html class

Best Atoum code snippet using html.getProjectName

Builder.php

Source:Builder.php Github

copy

Full Screen

...77 }78 /**79 * @return string80 */81 public function getProjectName():string {82 return $this->project_name;83 }84 /**85 * @param string $project_author86 */87 public function setProjectAuthor(string $project_author):void {88 $this->project_author=$project_author;89 }90 /**91 * @return string92 */93 public function getProjectAuthor():string {94 return $this->project_author;95 }96 /**97 * @param string $project_email98 */99 public function setProjectEmail(string $project_email):void {100 $this->project_email=$project_email;101 }102 /**103 * @return string104 */105 public function getProjectEmail():string {106 return $this->project_email;107 }108 /**109 * @param int $project_port110 */111 public function setProjectPort(int $project_port):void {112 if (($project_port<0)||($project_port>99)) {113 $project_port=1;114 }115 $this->project_port=$project_port;116 }117 /**118 * @return int119 */120 public function getProjectPort():int {121 return $this->project_port;122 }123 /**124 * @param string $project_type125 */126 public function setProjectType(string $project_type):void {127 if (!in_array($project_type, ['app', 'lib', 'service', 'framework'])) {128 $project_type='app';129 }130 $this->project_type=$project_type;131 }132 /**133 * @return string134 */135 public function getProjectType():string {136 return $this->project_type;137 }138 /**139 * @param string $project_debian140 */141 public function setProjectDebian(string $project_debian):void {142 if (!in_array($project_debian, ['bullseye', 'buster'])) {143 $project_debian='buster';144 }145 $this->project_debian=$project_debian;146 }147 /**148 * @return string149 */150 public function getProjectDebian():string {151 return $this->project_debian;152 }153 /**154 * @param string $project_php155 */156 public function setProjectPhp(string $project_php):void {157 if (!in_array($project_php, ['8.0', '8.1'])) {158 $project_php='8.0';159 }160 $this->project_php=$project_php;161 }162 /**163 * @return string164 */165 public function getProjectPhp():string {166 return $this->project_php;167 }168 /**169 * @param string $filename170 * @return bool171 */172 public function createZIP(string $filename=''):bool {173 if ($filename=='') {174 $filename=$this->getProjectCompany().'_'.$this->getProjectName().'.zip';175 }176 $this->za=new \ZipArchive;177 $this->za->open($filename, \ZipArchive::CREATE|\ZipArchive::OVERWRITE);178 $this->addPHPStorm();179 $this->addPHPCode();180 $this->addDocker();181 $this->addPHPConf();182 $this->addPHPUnit();183 $this->addCypress();184 $this->addWinShell();185 $this->addProject();186 $this->za->close();187 return true;188 }189 /**190 * @return bool191 */192 protected function addPHPStorm():bool {193 $gitignore=[];194 $gitignore[]='# Default ignored files';195 $gitignore[]='/shelf/';196 $gitignore[]='/workspace.xml';197 $gitignore[]='# Editor-based HTTP Client requests';198 $gitignore[]='/httpRequests/';199 $gitignore[]='# Datasource local storage ignored files';200 $gitignore[]='/dataSources/';201 $gitignore[]='/dataSources.local.xml';202 $this->za->addFromString('.idea/.gitignore', implode("\n", $gitignore));203 $this->za->addFromString('.idea/.name', $this->getProjectName());204 $base_iml=[];205 $base_iml[]='<?xml version="1.0" encoding="UTF-8"?>';206 $base_iml[]='<project version="4">';207 $base_iml[]=' <component name="ProjectModuleManager">';208 $base_iml[]=' <modules>';209 $base_iml[]=' <module fileurl="file://$PROJECT_DIR$/.idea/'.$this->getProjectName().'.iml" filepath="$PROJECT_DIR$/.idea/'.$this->getProjectName().'.iml" />';210 $base_iml[]=' </modules>';211 $base_iml[]=' </component>';212 $base_iml[]='</project>';213 $this->za->addFromString('.idea/modules.xml', implode("\n", $base_iml));214 $base_iml=[];215 $base_iml[]='<?xml version="1.0" encoding="UTF-8"?>';216 $base_iml[]='<module type="WEB_MODULE" version="4">';217 $base_iml[]=' <component name="NewModuleRootManager">';218 $base_iml[]=' <content url="file://$MODULE_DIR$" />';219 $base_iml[]=' <orderEntry type="inheritedJdk" />';220 $base_iml[]=' <orderEntry type="sourceFolder" forTests="false" />';221 $base_iml[]=' </component>';222 $base_iml[]='</module>';223 $this->za->addFromString('.idea/'.$this->getProjectName().'.iml', implode("\n", $base_iml));224 $base_iml=[];225 $base_iml[]='<?xml version="1.0" encoding="UTF-8"?>';226 $base_iml[]='<project version="4">';227 $base_iml[]=' <component name="PhpProjectSharedConfiguration" php_language_level="'.$this->getProjectPhp().'" />';228 $base_iml[]='</project>';229 $this->za->addFromString('.idea/php.xml', implode("\n", $base_iml));230 return true;231 }232 /**233 * @return bool234 */235 protected function addPHPCode():bool {236 if ($this->getProjectType()=='app') {237 $this->za->addFromString($this->getProjectType().'/index.php', file_get_contents('http://oswframe.com/installer'));238 }239 $base_file=[];240 $base_file[]='<?php';241 $base_file[]='';242 $base_file[]='phpinfo();';243 $base_file[]='';244 $base_file[]='?>';245 $this->za->addFromString($this->getProjectType().'/phpinfo.php', implode("\n", $base_file));246 $base_file=[];247 $base_file[]='<?php';248 $base_file[]='';249 $base_file[]='xdebug_info();';250 $base_file[]='';251 $base_file[]='?>';252 $this->za->addFromString($this->getProjectType().'/xdebuginfo.php', implode("\n", $base_file));253 return true;254 }255 /**256 * @return bool257 */258 protected function addDocker():bool {259 for ($i=$this->getProjectPort(); $i<=$this->getProjectPort()+1; $i++) {260 if ($i==$this->getProjectPort()) {261 $addon='';262 }263 if ($i==($this->getProjectPort()+1)) {264 $addon='-test';265 }266 $base_file=[];267 $base_file[]='version: \'3.8\'';268 $base_file[]='services:';269 $base_file[]=' '.$this->getProjectType().':';270 $base_file[]=' container_name: '.$this->getProjectName().'-'.$this->getProjectType().$addon;271 $base_file[]=' build: .';272 $base_file[]=' ports:';273 $base_file[]=' - "89'.sprintf('%02d', $i).':80"';274 $base_file[]=' volumes:';275 $base_file[]=' - type: bind';276 $base_file[]=' source: ./../..';277 $base_file[]=' target: /var/www/html';278 $base_file[]=' tty: true';279 $base_file[]=' database:';280 $base_file[]=' container_name: '.$this->getProjectName().'-database'.$addon;281 $base_file[]=' image: mariadb';282 $base_file[]=' ports:';283 $base_file[]=' - "87'.sprintf('%02d', $i).':3306"';284 $base_file[]=' environment:';285 $base_file[]=' MYSQL_ROOT_PASSWORD: mypassword';286 $base_file[]=' MYSQL_DATABASE: mydatabase';287 $base_file[]=' MYSQL_USER: myuser';288 $base_file[]=' MYSQL_PASSWORD: mypassword';289 $base_file[]=' MYSQL_INITDB_SKIP_TZINFO: 1';290 $base_file[]=' volumes:';291 $base_file[]=' - type: bind';292 $base_file[]=' source: ./../../backup/'.$this->getProjectName().$addon;293 $base_file[]=' target: /backup';294 $base_file[]=' command: --sql_mode=ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';295 $base_file[]=' adminer:';296 $base_file[]=' container_name: '.$this->getProjectName().'-adminer'.$addon;297 $base_file[]=' image: adminer';298 $base_file[]=' ports:';299 $base_file[]=' - 88'.sprintf('%02d', $i).':8080';300 $this->za->addFromString('docker/'.$this->getProjectName().$addon.'/docker-compose.yml', implode("\n", $base_file));301 $base_file=[];302 $base_file[]='FROM debian:'.$this->getProjectDebian();303 $base_file[]='';304 $base_file[]='LABEL maintainer="js@jbs-newmedia.de"';305 $base_file[]='LABEL description="Debian / Apache / PHP / Xdebug"';306 $base_file[]='';307 $base_file[]='#apt';308 $base_file[]='RUN apt update';309 $base_file[]='RUN apt -y upgrade';310 $base_file[]='';311 $base_file[]='#composer';312 $base_file[]='RUN apt -y install composer';313 $base_file[]='';314 $base_file[]='#apache2';315 $base_file[]='RUN apt -y install apache2';316 $base_file[]='RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf';317 $base_file[]='ENV APACHE_DOCUMENT_ROOT=/var/www/html/'.$this->getProjectType();318 $base_file[]='RUN sed -ri -e \'s!/var/www/html!${APACHE_DOCUMENT_ROOT}!g\' /etc/apache2/sites-available/*.conf';319 $base_file[]='';320 $base_file[]='#php'.$this->getProjectPhp();321 $base_file[]='RUN apt -y install wget lsb-release apt-transport-https ca-certificates';322 $base_file[]='RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg';323 $base_file[]='RUN echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list';324 $base_file[]='RUN apt update';325 $base_file[]='RUN apt -y upgrade';326 $base_file[]='RUN apt -y install php'.$this->getProjectPhp().'';327 $base_file[]='RUN apt -y install libapache2-mod-php'.$this->getProjectPhp().' php'.$this->getProjectPhp().'-bcmath php'.$this->getProjectPhp().'-gd php'.$this->getProjectPhp().'-sqlite3 php'.$this->getProjectPhp().'-mysqli php'.$this->getProjectPhp().'-curl php'.$this->getProjectPhp().'-xml php'.$this->getProjectPhp().'-mbstring php'.$this->getProjectPhp().'-zip php'.$this->getProjectPhp().'-intl php'.$this->getProjectPhp().'-xdebug mcrypt nano';328 $base_file[]='RUN apt -y autoremove';329 $base_file[]='RUN cd /etc/php/'.$this->getProjectPhp().'/apache2/conf.d/; ln -s /var/www/html/php-conf/'.$this->getProjectName().$addon.'/30-oswdocker.ini 30-oswdocker.ini';330 $base_file[]='RUN cd /etc/php/'.$this->getProjectPhp().'/apache2/conf.d/; ln -s /var/www/html/php-conf/'.$this->getProjectName().$addon.'/40-oswdocker-custom.ini 40-oswdocker-custom.ini';331 $base_file[]='RUN cd /etc/php/'.$this->getProjectPhp().'/cli/conf.d/; ln -s /var/www/html/php-conf/'.$this->getProjectName().$addon.'/30-oswdocker.ini 30-oswdocker.ini';332 $base_file[]='RUN cd /etc/php/'.$this->getProjectPhp().'/cli/conf.d/; ln -s /var/www/html/php-conf/'.$this->getProjectName().$addon.'/40-oswdocker-custom.ini 40-oswdocker-custom.ini';333 $base_file[]='';334 $base_file[]='#environment';335 $base_file[]='RUN cd /; ln -s /var/www/html/backup/'.$this->getProjectName().$addon.'/ backup';336 $base_file[]='RUN apt -y install locales';337 $base_file[]='RUN sed -i \'/en_US.UTF-8/s/^# //g\' /etc/locale.gen';338 $base_file[]='RUN sed -i \'/de_DE.UTF-8/s/^# //g\' /etc/locale.gen';339 $base_file[]='RUN locale-gen';340 $base_file[]='RUN a2enmod rewrite';341 $base_file[]='RUN sed -i \'/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/\' /etc/apache2/apache2.conf';342 $base_file[]='EXPOSE 80';343 $base_file[]='CMD ["/usr/sbin/apache2ctl","-DFOREGROUND"]';344 $base_file[]='';345 $base_file[]='#restart apache';346 $base_file[]='RUN apache2ctl restart';347 $this->za->addFromString('docker/'.$this->getProjectName().$addon.'/Dockerfile', implode("\n", $base_file));348 }349 return true;350 }351 /**352 * @return bool353 */354 protected function addPHPConf():bool {355 $base_file=[];356 $base_file[]=';;;;;;;;;;;;;;;;;;;;;;';357 $base_file[]='; osWDocker settings ;';358 $base_file[]=';;;;;;;;;;;;;;;;;;;;;;';359 $base_file[]='';360 $base_file[]='error_reporting = E_ALL';361 $base_file[]='display_errors = On';362 $base_file[]='zlib.output_compression = Off';363 $base_file[]='memory_limit = 256M';364 $base_file[]='max_execution_time = 120';365 $base_file[]='max_input_time = 120';366 $base_file[]='post_max_size = 32M';367 $base_file[]='upload_max_filesize = 8M';368 $base_file[]='opcache.revalidate_freq = 0';369 $base_file[]='xdebug.mode=debug';370 $base_file[]='xdebug.client_host=host.docker.internal';371 $base_file[]='xdebug.client_port=9003';372 $base_file[]='xdebug.idekey=docker';373 $this->za->addFromString('php-conf/'.$this->getProjectName().'/30-oswdocker.ini', implode("\n", $base_file));374 $this->za->addFromString('php-conf/'.$this->getProjectName().'-test/30-oswdocker.ini', implode("\n", $base_file));375 $base_file=[];376 $base_file[]=';;;;;;;;;;;;;;;;;;;';377 $base_file[]='; Custom settings ;';378 $base_file[]=';;;;;;;;;;;;;;;;;;;';379 $base_file[]='';380 $this->za->addFromString('php-conf/'.$this->getProjectName().'/40-oswdocker-custom.ini', implode("\n", $base_file));381 $this->za->addFromString('php-conf/'.$this->getProjectName().'-test/40-oswdocker-custom.ini', implode("\n", $base_file));382 return true;383 }384 /**385 * @return bool386 */387 protected function addPHPUnit():bool {388 $base_file=[];389 $base_file[]='<?xml version="1.0" encoding="UTF-8"?>';390 $base_file[]='';391 $base_file[]='<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->';392 $base_file[]='<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"';393 $base_file[]=' xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"';394 $base_file[]=' colors="true"';395 $base_file[]=' bootstrap="/var/www/html/tests/bootstrap.php"';396 $base_file[]='>';397 $base_file[]=' <php>';398 $base_file[]=' <ini name="error_reporting" value="-1"/>';399 $base_file[]=' </php>';400 $base_file[]=' <testsuites>';401 $base_file[]=' <testsuite name="Project Test Suite">';402 $base_file[]=' <directory>tests</directory>';403 $base_file[]=' </testsuite>';404 $base_file[]=' </testsuites>';405 $base_file[]='</phpunit>';406 $this->za->addFromString('phpunit.xml.dist', implode("\n", $base_file));407 $base_file=[];408 $base_file[]='<?php';409 $base_file[]='declare(strict_types=1);';410 $base_file[]='require dirname(__DIR__).\'/vendor/autoload.php\';';411 if ($this->getProjectType()=='app') {412 $base_file[]='require dirname(__DIR__) . \'/app/frame/namespaces/osWFrame/Autoload.php\';';413 $base_file[]='require dirname(__DIR__) . \'/app/frame/namespaces/osWFrame/Functions.php\';';414 }415 $base_file[]='?>';416 $this->za->addFromString('tests/bootstrap.php', implode("\n", $base_file));417 $this->za->addFromString('tests/Tests/dummy.txt', 'Place for phpunit tests');418 return true;419 }420 /**421 * @return bool422 */423 protected function addCypress():bool {424 $base_file=[];425 $base_file[]='{';426 $base_file[]=' "viewportWidth": 1920,';427 $base_file[]=' "viewportHeight": 1024,';428 $base_file[]=' "videosFolder": "../../var/e2e/videos",';429 $base_file[]=' "screenshotsFolder": "../../var/e2e/screenshots"';430 $base_file[]='}';431 $this->za->addFromString('tests/e2e/cypress/cypress.json', implode("\n", $base_file));432 $this->za->addFromString('tests/e2e/cypress/integration/dummy.txt', 'Place for cypress tests');433 return true;434 }435 /**436 * @return bool437 */438 protected function addWinShell():bool {439 for ($i=$this->getProjectPort(); $i<=$this->getProjectPort()+1; $i++) {440 if ($i==$this->getProjectPort()) {441 $addon='';442 $services=[$this->getProjectType(), 'database', 'adminer'];443 $db_service='database';444 }445 if ($i==($this->getProjectPort()+1)) {446 $addon='-test';447 $services=[$this->getProjectType(), 'database', 'adminer'];448 $db_service='database';449 }450 foreach ($services as $service) {451 $base_file=[];452 $base_file[]='@echo off';453 $base_file[]='setlocal';454 $base_file[]=':PROMPT';455 $base_file[]='SET /P AREYOUSURE=Rebuild '.$service.' container. Are you sure (y/[n])?';456 $base_file[]='IF /I "%AREYOUSURE%" NEQ "y" GOTO END';457 $base_file[]='';458 $base_file[]='docker-compose -f ../../docker/'.$this->getProjectName().$addon.'/docker-compose.yml -p "'.$this->getProjectName().$addon.'" up -d --no-deps --build '.$service;459 $base_file[]='';460 $base_file[]=':END';461 $base_file[]='endlocal';462 $this->za->addFromString('win/'.$this->getProjectName().$addon.'/oswdocker-build-'.$service.'.bat', implode("\n", $base_file));463 $base_file=[];464 $base_file[]='docker-compose -f ../../docker/'.$this->getProjectName().$addon.'/docker-compose.yml -p "'.$this->getProjectName().$addon.'" exec '.$service.' /bin/bash';465 $this->za->addFromString('win/'.$this->getProjectName().$addon.'/oswdocker-ssh-'.$service.'.bat', implode("\n", $base_file));466 }467 $base_file=[];468 $base_file[]='@echo off';469 $base_file[]='setlocal';470 $base_file[]=':PROMPT';471 $base_file[]='SET /P AREYOUSURE=Export database. Are you sure (y/[n])?';472 $base_file[]='IF /I "%AREYOUSURE%" NEQ "y" GOTO END';473 $base_file[]='';474 $base_file[]='docker-compose -f ../../docker/'.$this->getProjectName().$addon.'/docker-compose.yml -p "'.$this->getProjectName().$addon.'" exec '.$db_service.' bash -c "mysqldump -u myuser -pmypassword mydatabase > /backup/mysql.sql"';475 $base_file[]='';476 $base_file[]=':END';477 $base_file[]='endlocal';478 $this->za->addFromString('win/'.$this->getProjectName().$addon.'/oswdocker-ssh-database-export.bat', implode("\n", $base_file));479 $base_file=[];480 $base_file[]='@echo off';481 $base_file[]='setlocal';482 $base_file[]=':PROMPT';483 $base_file[]='SET /P AREYOUSURE=Import database. Are you sure (y/[n])?';484 $base_file[]='IF /I "%AREYOUSURE%" NEQ "y" GOTO END';485 $base_file[]='';486 $base_file[]='docker-compose -f ../../docker/'.$this->getProjectName().$addon.'/docker-compose.yml -p "'.$this->getProjectName().$addon.'" exec '.$db_service.' bash -c "mysql -u myuser -pmypassword mydatabase < /backup/mysql.sql"';487 $base_file[]='';488 $base_file[]=':END';489 $base_file[]='endlocal';490 $this->za->addFromString('win/'.$this->getProjectName().$addon.'/oswdocker-ssh-database-import.bat', implode("\n", $base_file));491 $base_file=[];492 $base_file[]='@echo off';493 $base_file[]='setlocal';494 $base_file[]=':PROMPT';495 $base_file[]='SET /P AREYOUSURE=Export files. Are you sure (y/[n])?';496 $base_file[]='IF /I "%AREYOUSURE%" NEQ "y" GOTO END';497 $base_file[]='';498 $base_file[]='docker-compose -f ../../docker/'.$this->getProjectName().$addon.'/docker-compose.yml -p "'.$this->getProjectName().$addon.'" exec '.$this->getProjectType().' bash -c "cd /var/www/html/; tar --exclude=\'./vendor\' -czf /backup/files.tar.gz '.$this->getProjectType().'"';499 $base_file[]='';500 $base_file[]=':END';501 $base_file[]='endlocal';502 $this->za->addFromString('win/'.$this->getProjectName().$addon.'/oswdocker-ssh-'.$this->getProjectType().'-export.bat', implode("\n", $base_file));503 $base_file=[];504 $base_file[]='@echo off';505 $base_file[]='setlocal';506 $base_file[]=':PROMPT';507 $base_file[]='SET /P AREYOUSURE=Import files. Are you sure (y/[n])?';508 $base_file[]='IF /I "%AREYOUSURE%" NEQ "y" GOTO END';509 $base_file[]='';510 $base_file[]='docker-compose -f ../../docker/'.$this->getProjectName().$addon.'/docker-compose.yml -p "'.$this->getProjectName().$addon.'" exec '.$this->getProjectType().' bash -c "cd /var/www/; tar -xf /backup/files.tar.gz"';511 $base_file[]='';512 $base_file[]=':END';513 $base_file[]='endlocal';514 $this->za->addFromString('win/'.$this->getProjectName().$addon.'/oswdocker-ssh-'.$this->getProjectType().'-import.bat', implode("\n", $base_file));515 $base_file=[];516 $base_file[]='docker-compose -f ../../docker/'.$this->getProjectName().$addon.'/docker-compose.yml -p "'.$this->getProjectName().$addon.'" exec '.$this->getProjectType().' bash -c "cd /var/www/html/'.$this->getProjectType().'/; ln -s /var/www/html/vendor/ vendor; chown -R www-data:www-data /var/www/html; find /var/www/html -type d -exec chmod 775 {} +; find /var/www/html -type f -not -executable -exec chmod 664 {} +; find /var/www/html -type f -executable -exec chmod 775 {} +;"';517 $this->za->addFromString('win/'.$this->getProjectName().$addon.'/oswdocker-ssh-'.$this->getProjectType().'-env.bat', implode("\n", $base_file));518 $base_file=[];519 $base_file[]='docker-compose -f ../../docker/'.$this->getProjectName().$addon.'/docker-compose.yml -p "'.$this->getProjectName().$addon.'" up -d';520 $this->za->addFromString('win/'.$this->getProjectName().$addon.'/oswdocker-start.bat', implode("\n", $base_file));521 $base_file=[];522 $base_file[]='docker-compose -f ../../docker/'.$this->getProjectName().$addon.'/docker-compose.yml -p "'.$this->getProjectName().$addon.'" down';523 $this->za->addFromString('win/'.$this->getProjectName().$addon.'/oswdocker-stop.bat', implode("\n", $base_file));524 }525 return true;526 }527 /**528 * @return bool529 */530 protected function addProject():bool {531 $base_file=[];532 $base_file[]='*.css text eol=lf';533 $base_file[]='*.scss text eol=lf';534 $base_file[]='*.htaccess text eol=lf';535 $base_file[]='*.htm text eol=lf';536 $base_file[]='*.html text eol=lf';537 $base_file[]='*.js text eol=lf';538 $base_file[]='*.json text eol=lf';539 $base_file[]='*.map text eol=lf';540 $base_file[]='*.md text eol=lf';541 $base_file[]='*.php text eol=lf';542 $base_file[]='*.profile text eol=lf';543 $base_file[]='*.script text eol=lf';544 $base_file[]='*.sh text eol=lf';545 $base_file[]='*.svg text eol=lf';546 $base_file[]='*.txt text eol=lf';547 $base_file[]='*.xml text eol=lf';548 $base_file[]='*.yml text eol=lf';549 $this->za->addFromString('.gitattributes', implode("\n", $base_file));550 $base_file=[];551 if ($this->getProjectType()=='app') {552 $base_file[]='/app/.caches/';553 $base_file[]='/app/.locks/';554 $base_file[]='/app/.logs/';555 $base_file[]='/app/.sessions/';556 $base_file[]='/app/data/.tmp/';557 $base_file[]='/app/data/resources/';558 $base_file[]='/app/oswtools/.caches/';559 $base_file[]='/app/oswtools/.locks/';560 $base_file[]='/app/oswtools/.logs/';561 $base_file[]='/app/oswtools/.sessions/';562 $base_file[]='/app/oswtools/data/.tmp/';563 $base_file[]='/app/vendor';564 }565 $base_file[]='/backup/';566 $base_file[]='/var/';567 $base_file[]='/vendor/';568 $this->za->addFromString('.gitignore', implode("\n", $base_file));569 $base_file=[];570 $base_file[]='{';571 $base_file[]='"name": "'.$this->getProjectCompany().'/'.$this->getProjectName().'",';572 $base_file[]=' "type": "'.$this->getProjectType().'",';573 $base_file[]=' "license": "MIT",';574 $base_file[]=' "authors": [';575 $base_file[]=' {';576 $base_file[]=' "name": "'.$this->getProjectAuthor().'",';577 $base_file[]=' "email": "'.$this->getProjectEmail().'"';578 $base_file[]=' }';579 $base_file[]=' ],';580 $base_file[]=' "minimum-stability": "dev",';581 $base_file[]=' "require-dev": {';582 $base_file[]=' "phpunit/phpunit": "^9"';583 $base_file[]=' }';584 $base_file[]='}';585 $this->za->addFromString('composer.json', implode("\n", $base_file));...

Full Screen

Full Screen

list_linux.php

Source:list_linux.php Github

copy

Full Screen

...14 //! \author Jo200315 //! \param --16 //! \return project name17 //--------------------------------------------------------------------18 function getProjectName ()19 {20 global $_projects, $_filter;21 22 $match = 0;23 $i = 0;24 $project = "";25 26 for ($i = 0; $i < count($_projects); $i ++)27 {28 if (stripos ($_projects[$i], $_filter) !== false)29 {30 $project = $_projects[$i];31 $match ++; 32 }33 }34 35 if (($match == 0) || ($match > 1))36 {37 $project = "VLC-Record";38 }39 return $project;40 }41?>42<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"43 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">44<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>45 <head>46 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />47 <title><?php echo getProjectName(); ?> Linux-Downloads</title>48 <style type="text/css">49 <!--50 body {font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; margin: 0px; padding: 0px; text-align: center; color: #3A3A3A; background-color: #F4F4F4}51 h1 {color: #036;}52 li {margin: 10px;}53 ul {border: 1px dotted #040404; width: 600px; }54 .red {color: red;}55 a:link, a:visited, a:active { text-decoration: underline; color: #444444}56 a:hover { text-decoration: underline; color: #0482FE }57 .mainframe {text-align: left; margin: 50px; padding: 50px; width: 80%; }58 -->59 </style>60 </head>61 <body>62 <div class='mainframe'>63 <h1><?php echo getProjectName(); ?> Linux-Downloads</h1>64 Please choose the download matching your architecture!65 <ul>66 <li>Ubuntu <b class='red'>32 bit</b> (i386): <a href="<?php echo $_link32; ?>" title="32bit">http://code.google.com/p/vlc-record/down ... i386.deb</a></li>67 <li>Ubuntu <b class='red'>64 bit</b> (amd64): <a href="<?php echo $_link64; ?>" title="64bit">http://code.google.com/p/vlc-record/down ... amd64.deb</a></li>68 </ul>69 </div>70 </body>71</html>...

Full Screen

Full Screen

getProjectName

Using AI Code Generation

copy

Full Screen

1$html = new html();2echo $html->getProjectName();3$html = new html();4echo $html->getProjectName();5$html = new html();6echo $html->getProjectName();7$html = new html();8echo $html->getProjectName();9$html = new html();10echo $html->getProjectName();11$html = new html();12echo $html->getProjectName();13$html = new html();14echo $html->getProjectName();15$html = new html();16echo $html->getProjectName();17$html = new html();18echo $html->getProjectName();19$html = new html();20echo $html->getProjectName();21$html = new html();22echo $html->getProjectName();23$html = new html();24echo $html->getProjectName();25$html = new html();26echo $html->getProjectName();27$html = new html();28echo $html->getProjectName();29$html = new html();30echo $html->getProjectName();31$html = new html();32echo $html->getProjectName();

Full Screen

Full Screen

getProjectName

Using AI Code Generation

copy

Full Screen

1require_once 'html.php';2$html = new html();3echo $html->getProjectName();4require_once 'html.php';5$html = new html();6echo $html->getProjectName();7{8 public function getProjectName()9 {10 return "Project Name";11 }12}

Full Screen

Full Screen

getProjectName

Using AI Code Generation

copy

Full Screen

1require_once('html.php');2$obj = new html();3echo $obj->getProjectName();4require_once('html.php');5$obj = new html();6echo $obj->getProjectName();7require_once('html.php');8$obj = new html();9echo $obj->getProjectName();

Full Screen

Full Screen

getProjectName

Using AI Code Generation

copy

Full Screen

1include_once('html.php');2$obj = new html();3echo $obj->getProjectName();4include_once('html.php');5$obj = new html();6echo $obj->getProjectName();7include_once('html.php');8$obj = new html();9echo $obj->getProjectName();10include_once('html.php');11$obj = new html();12echo $obj->getProjectName();13include_once('html.php');14$obj = new html();15echo $obj->getProjectName();16include_once('html.php');17$obj = new html();18echo $obj->getProjectName();19include_once('html.php');20$obj = new html();21echo $obj->getProjectName();22include_once('html.php');23$obj = new html();24echo $obj->getProjectName();25include_once('html.php');26$obj = new html();27echo $obj->getProjectName();28include_once('html.php');29$obj = new html();30echo $obj->getProjectName();31include_once('html.php');32$obj = new html();33echo $obj->getProjectName();34include_once('html.php');35$obj = new html();36echo $obj->getProjectName();37include_once('html.php');38$obj = new html();39echo $obj->getProjectName();40include_once('html

Full Screen

Full Screen

getProjectName

Using AI Code Generation

copy

Full Screen

1echo $html->getProjectName();2echo $html->getProjectName();3echo $html->getProjectName();4echo $html->getProjectName();5echo $html->getProjectName();6echo $html->getCounter();

Full Screen

Full Screen

getProjectName

Using AI Code Generation

copy

Full Screen

1require_once('html.php');2$html = new html;3echo $html->getProjectName();4require_once('html.php');5$html = new html;6echo $html->getProjectName();7require_once('html.php');8$html = new html;9echo $html->getProjectName();10require_once('html.php');11$html = new html;12echo $html->getProjectName();13require_once('html.php');14$html = new html;15echo $html->getProjectName();16require_once('html.php');17$html = new html;18echo $html->getProjectName();19require_once('html.php');20$html = new html;21echo $html->getProjectName();22require_once('html.php');23$html = new html;24echo $html->getProjectName();25require_once('html.php');26$html = new html;27echo $html->getProjectName();28require_once('html.php');29$html = new html;30echo $html->getProjectName();31require_once('html.php');32$html = new html;33echo $html->getProjectName();

Full Screen

Full Screen

getProjectName

Using AI Code Generation

copy

Full Screen

1echo $html->getProjectName();2echo $html->getProjectName();3require_once("html.php");4echo $html->getProjectName();5echo $html->getProjectName();6PHP include() vs require() vs include_once() vs require_once()7PHP include() vs require()8PHP include_once() vs require_once()9PHP include() vs require() vs include_once() vs require_once()10PHP include() vs require()11include() and require() are used to include PHP files. The main difference between the two is that if the file specified in the include

Full Screen

Full Screen

getProjectName

Using AI Code Generation

copy

Full Screen

1session_start();2include("html.php");3$html = new html();4$html->setProjectName("Project 1");5echo $html->getProjectName();6session_start();7$_SESSION['variable_name'] = 'value';8session_start();9$_SESSION["favcolor"] = "green";10$_SESSION["favanimal"] = "cat";11$_SESSION['variable_name'];12session_start();13echo "Favorite color is " . $_SESSION["favcolor"] . ".<br>";14echo "Favorite animal is " . $_SESSION["favanimal"] . ".";15session_start();16unset($_SESSION["favcolor"]);17unset($_SESSION["favanimal"]);18session_start();19session_destroy();

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful