Jump to content

Search the Community

Showing results for tags 'orientação a objetos'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Q&A Desenvolvimento
    • Perguntas e respostas rápidas
  • Desenvolvimento e Banco de Dados
    • HTML e CSS
    • Java
    • Javascript
    • .NET
    • PHP
    • Python
    • Ruby
    • Mobile
    • Ambientes de Desenvolvimento
    • Arquitetura e Métodos Ágeis
    • Banco de Dados
    • DevOps
    • Desenvolvimento de Games
    • E-Commerce e Pagamentos Online
    • SEO e Otimizações
    • WordPress
    • Algoritmos & Outras Tecnologias
  • Design e Produto
    • Fotografia
    • Photoshop
    • Design de interfaces e UX
    • Edição/Produção de Vídeos
    • Marketing Online
    • Desenho, Ilustração e 3D
  • Entretenimento e uso pessoal
    • Geral
    • Segurança & Malwares
    • Gadgets e wearable
    • Softwares e Apps
    • Entretenimento

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Google+


Hangouts


Skype


Twitter


deviantART


Github


Flickr


LinkedIn


Pinterest


Facebook


Site Pessoal


Localização


Interesses

Found 2 results

  1. thiagoprogramador

    Como exibir o valor de uma classe

    Olá tenho uma variável que retorna: WC_Order Object ( [status_transition:protected] => [data:protected] => Array ( [shipping] => Array ( [first_name] => Alex [last_name] => Silva ) ) Como faço para acessar o nome Alex e Silva, dentro do objeto?
  2. Vinicius Cainelli

    Compartilhar variáveis entre dois métodos

    Basicamente, o que eu tenho em uma classe são dois métodos. - getEstablishment($establishmentId) que pega todos os dados de um determinado estabelecimento baseado no id passado. - getAllEstablishments() que me da um array com todos os dados de todos os estabelecimentos que tenho no meu banco Se repararem no código, vão ver que repete muitas variaveis, existe alguma forma de eu compartilha-lhas entre esses métodos? function getEstablishment($establishmentId) { $query = "SELECT * FROM establishment WHERE establishment_id='{$establishmentId}' LIMIT 0,1"; $result = mysqli_query($this->connection, $query); $establishmentArray = mysqli_fetch_assoc($result); $docNumber = $establishmentArray['doc_number']; $legalName = $establishmentArray['legal_name']; $socialName = $establishmentArray['social_name']; $type = $establishmentArray['type_id']; $email = $establishmentArray['email']; $website = $establishmentArray['website']; $plan = $establishmentArray['plan_id']; $agreeTerm = $establishmentArray['agree_term']; $address = $establishmentArray['address']; $district = $establishmentArray['district']; $city = $establishmentArray['city_id']; $zipCode = $establishmentArray['postal_code']; $phone = $establishmentArray['phone']; $created = $establishmentArray['created']; $lastUpdate = $establishmentArray['last_update']; $establishment = new Establishment($docNumber, $legalName, $socialName, $type, $email, $website, $plan, $agreeTerm, $address, $district, $city, $zipCode, $phone, $created, $lastUpdate); return $establishment; } function getAllEstablishments() { $establishments = array(); $query = "SELECT * FROM establishment ORDER BY establishment_id DESC"; $result = mysqli_query($this->connection, $query); while ($establishmentArray = mysqli_fetch_assoc($result)) { $establishmentId = $establishmentArray['establishment_id']; $docNumber = $establishmentArray['doc_number']; $legalName = $establishmentArray['legal_name']; $socialName = $establishmentArray['social_name']; $type = $establishmentArray['type_id']; $email = $establishmentArray['email']; $website = $establishmentArray['website']; $plan = $establishmentArray['plan_id']; $agreeTerm = $establishmentArray['agree_term']; $address = $establishmentArray['address']; $district = $establishmentArray['district']; $city = $establishmentArray['city_id']; $zipCode = $establishmentArray['postal_code']; $phone = $establishmentArray['phone']; $created = $establishmentArray['created']; $lastUpdate = $establishmentArray['last_update']; $establishment = new Establishment($docNumber, $legalName, $socialName, $type, $email, $website, $plan, $agreeTerm, $address, $district, $city, $zipCode, $phone, $created, $lastUpdate); $establishment->setId($establishmentId); array_push($establishments, $establishment); } return $establishments; }
×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.