TYPE-0 PERFECT SEIHA
Server Info:
FreeBSD scimitar.blueboard.cz 13.5-STABLE FreeBSD 13.5-STABLE stable/13-4f2925105 GENERIC amd64
Software:
Apache
User:
www
Crot
Crot File
Crot Dir
Crot Command
[LockSelf]
[HOME]
data
www
19068
fszoo_net
www
api
1
root
local_vendor
teze
teze
src
bc2
di
src
DI
Show Hidden Files
Edit File: /data/www/19068/fszoo_net/www/api/1/root/local_vendor/teze/teze/src/bc2/di/src/DI/Validator.php
<?php namespace Teze\DI; /** * Class Validator * @package Teze\DI * @deprecated */ class Validator extends \Nette\Object { private $container; private $parameters = array(); private $filename; private $line = 0; public function __construct(ServiceContainer $container = NULL) { $this->container = $container; $this->parameters = $container->parameters; } public function validate($filename) { $this->filename = $filename; if (!file_exists($filename)) throw new \Nette\FileNotFoundException('File ' . $filename . ' does not exist.'); $content = file_get_contents($filename); $lines = explode("\n", $content); $this->line = 0; foreach ($lines as $line) { $this->line++; $trim = trim($line); if (strlen($line) && $line[0] == '#') continue; // end of line $last = substr($trim, -1); if($trim && !preg_match('#[a-z0-9\(\):%]#', $last)) $this->error ('Unexpected end of line.'); // params $matches = array(); preg_match_all('#%[a-zA-Z0-9.]*%#', $line, $matches); if (count($matches[0])) { foreach ($matches[0] as $parameter) { $parameter = substr($parameter, 1, -1); $split = explode('.', $parameter); $counter = 0; foreach ($split as $part) { if (!$counter) { if (!isset($this->parameters[$part])) $this->error('Variable %s does not exist.', $part); $var = $this->parameters[$part]; } else { if (!isset($var[$part])) { for ($i = 0; $i < $content; $i++) $varName[] = $split[$i]; $this->error('Variable %s does not exist.', implode('.', $varName)); } $var = $var[$part]; } $counter++; } } } // callback if (preg_match('#^callback:#', $trim)) { if ($trim != 'callback:') $this->error('Invalid callback'); } // services $matches = array(); if(preg_match('#@[a-z0-9A-Z]+#', $trim, $matches)){ if(!$this->container->hasService(substr($matches[0], 1))){ $this->error("Service $matches[0] does not exist."); } } } } private function error($message, $param = NULL) { if ($param) $message = sprintf($message, $param); $e = new CompileException($message); $e->setFile($this->filename); $e->setLine($this->line); throw $e; } }
Crotin
Name
Size
Permissions
Modified
User/Group
Validator.php
2361
0644
2018-07-10 17:52:01
Unknown/Unknown
InterfaceTemplate.phpt
193
0644
2018-07-10 17:52:00
Unknown/Unknown
Dependences.php
2002
0644
2018-07-10 17:52:01
Unknown/Unknown
FactoryClassTemplate.phpt
499
0644
2018-07-10 17:52:01
Unknown/Unknown
IFactory.php
222
0644
2018-07-10 17:52:01
Unknown/Unknown
Config.php
326
0644
2018-07-10 17:52:01
Unknown/Unknown
DependencyBuilder.php
2868
0644
2018-07-10 17:52:01
Unknown/Unknown
ClassBuilder.php
1659
0644
2018-07-10 17:52:01
Unknown/Unknown
PresenterFactory.php
923
0644
2018-07-10 17:52:01
Unknown/Unknown
DependencyException.php
291
0644
2018-07-10 17:52:01
Unknown/Unknown
ServiceContainer.php
1611
0644
2018-07-10 17:52:01
Unknown/Unknown
Container.php
11690
0644
2018-07-10 17:52:01
Unknown/Unknown
CompileException.php
287
0644
2018-07-10 17:52:01
Unknown/Unknown
IClassBuilder.php
253
0644
2018-07-10 17:52:01
Unknown/Unknown
NGANU
Rename
Hapus
Chmod
Chown
Touch
Zip
Unzip
Download
Crotin