Exemplo n.º 1
0
 public function __construct()
 {
     $this->db = new AddSignal_db();
     $this->msg = Message::getInstace();
     $this->signalsTypes = $this->db->getSignalTypes();
     $this->dirImages = TaskStore::$dirProject . '/images';
     $this->htmlDirImages = TaskStore::$htmlDirTop . '/images';
 }
Exemplo n.º 2
0
 public function __construct($nodeRootName)
 {
     $this->msg = Message::getInstace();
     $taskPar = TaskParameters::getInstance();
     $nodeRootName = false === $nodeRootName ? 'requestRoot' : $nodeRootName;
     $requestTree = new RequestTree();
     $requestTree->setNodeRoot($nodeRootName);
     // имя корня
     $answ = $requestTree->uploadTree();
     $this->requestTree = $answ['nodes'];
     $this->conceptFunction = new ConceptFunction();
 }
Exemplo n.º 3
0
 public function __construct()
 {
     $this->taskpPar = TaskParameters::getInstance();
     $this->msg = Message::getInstace();
     $config = yandexConfig();
     $this->user = $config['yandexUser'];
     $this->url = $config['yandexUrl'];
     $this->key = $config['yandexKey'];
     $this->host = $config['searchHost'];
     //----------------------------------//
     $this->Yandex = new Yandex($this->user, $this->key, $this->url);
 }
Exemplo n.º 4
0
    {
        $sql = 'INSERT INTO add_signals (typeid, file_name,name,rang, text)
                                 VALUES (:typeid, :fileName, :name, :rang, :text)';
        $subst = ['typeid' => $currentSignal['typeid'], 'fileName' => $currentSignal['file'], 'name' => $currentSignal['name'], 'rang' => $currentSignal['rang'], 'text' => $currentSignal['text']];
        $result = $this->sqlExecute($sql, $subst, __METHOD__);
        if (false === $result) {
            $this->errors[] = ['successful' => false, 'sql' => $sql, 'subst' => $subst, 'message' => $this->msg->getMessages()];
            return false;
        }
        return $result;
    }
}
$currentDir = __DIR__;
$sourceFile = $currentDir . '/addSignals.csv';
$signalsLoad = new AddSignalLoad();
$msg = Message::getInstace();
function load($signalLoad, $type, $signal)
{
    //    echo $signal['id'].'------'.
    //        $type['comment'].'-----'.
    //        $signal['name'].'-----'.
    //        $signal['file'].'-----'.
    //        mb_substr($signal['text'],0,50).'-----'.
    //        mb_strlen($signal['text']).
    //        '<br>'
    //    ;
    $signal['typeid'] = $type['typeid'];
    $sign = rand(0, 1);
    $sign = $sign > 0 ? 1 : -1;
    $signal['rang'] = rand(0, 100) * $sign;
    $signalLoad->putSignal($signal);
Exemplo n.º 5
0
 public function __construct()
 {
     $this->db = new RequestTree_db();
     $this->msg = Message::getInstace();
 }
Exemplo n.º 6
0
 public function __construct()
 {
     $this->msg = Message::getInstace();
     $this->db = new GeoLocation_db();
     $this->city = ['cityId' => 77, 'regionId' => 77, 'cityName' => 'Москва', 'citySize' => 'big'];
 }
Exemplo n.º 7
0
 public function __construct()
 {
     $this->db = new Thoughts_db();
     $this->msg = Message::getInstace();
 }
Exemplo n.º 8
0
 public function __construct()
 {
     $this->msg = Message::getInstace();
 }
Exemplo n.º 9
0
 public function __construct()
 {
     $this->pdo = DbConnector::getConnect();
     $this->msg = Message::getInstace();
 }