Questions tagged as 'namespace'

2
answers

Namespace declaration statement has to be the first statement or after any declare call in the script

I would like to know what caused this problem that I resolved "sort of without knowing how". I created the file mysql.php using the PSPad editor to debug some queries and mysteriously started to look like the error: Fatal error: Name...
asked by 17.09.2015 / 04:38
0
answers

How to use make call another namespace without using include?

I see developers at all times using the "use" command under the "namespace" command without first using an include. An example is the Medoo library: namespace Medoo; use PDO; use Exception; use PDOException; class Raw { public $map;...
asked by 01.09.2018 / 03:53
0
answers

Namespaces and Require

I have my Index.php Knowing that Folder and Folder are namespaces. How do I extend Sql Register class? and how do I use Register methods in index.php; Thank you from now     
asked by 14.06.2018 / 07:23
0
answers

Namespace: Connection Works but Query NOT

So when I get to Classe Plans below <?php   namespace CONTROLES;    class Planos {            private $conexao;            public function __construct ($_conexao) {                  $this->conexao = $_conexao;      }           ...
asked by 13.06.2018 / 14:36
0
answers

Autoload composer does not work

Good morning! I do not know what to do, my Composer autoload not work at all ... The error I get is always Uncaught Error: Class 'App\Lucass\Fazendo' not found in /var/www/projetos/teste/index.php on line 6' not found Follow my f...
asked by 17.04.2018 / 15:42
2
answers

Is it possible to view all the contents of a namespace in C ++?

When you make the policy: using namespace std; //primeira forma You get direct access to all elements of the std namespace. But suppose you want to use only std::cout or std::endl so it would be better to use the policy: u...
asked by 15.07.2017 / 19:17
1
answer

My autoload by the composer is not working

I'm learning to do autoload using the composer, but I'm getting the following error while performing the tests:    Fatal error: Class 'App \ Model \ Database' not found in /var/www/Library/index.php on line 5 It's like he's not finding th...
asked by 01.07.2017 / 21:23
2
answers

How do namespaces work in PHP?

namespaces were implemented from PHP 5.3.0 as a form of "encapsulate items". I've never really understood his real concept, and I always get confused by class autoload . Could someone explain me, in a simple way, how namespaces , why...
asked by 17.12.2015 / 13:23
0
answers

Namespace problem only works local

I'm having the following error: Fatal error: Class 'Kse\init\Bootstrap' not found in /home/dksec173/public_html/App/Route.php on line 8 In the development the namespace are working correctly, but when uploading to the server appears this er...
asked by 25.04.2017 / 15:01
0
answers

PDO class not found in namespace other than global

I am creating a class that uses PDO, but in a namespace other than global: namespace Classes\Config; use \PDO; class Connection { public static function getConnection() { $dbhost = "algumhost"; $dbuser = "algumuser";...
asked by 13.03.2017 / 19:52